Jump to content

How do I execute a php code when a html link is clicked


flit

Recommended Posts

??? ??? ???

what i understand from your question is you want your url to be in .html and internally you want to call a php page is it?

 

if my understaing is correct

 

you hv to use the .htacces file to define some rules to call a php page internally when you execute a html page

 

please go through the url rewrite using .htaccess in php

 

 

(at least, I hope not - unless they are getting paid).

i dont think this attitude is good when you are in a php or any other open source supported programmer 

Link to comment
Share on other sites

Sorry for my bad english, but what I really mean is something like this:

 

<a href="1.php"<?php ...........?>Link</a>

something like that, I know that the code above is not possible but something like that

when I click the link I want some code to be executed. I am trying to delete a session id

when I click on a link.

Link to comment
Share on other sites

when you click the link go to a page where you can write code to delete the section form this page redirect to actual page you want to go

 

that is in btween one page come but user dosent really notice that

 

eg you are in my.php from here you click logout.php when you click logout.php you should delete the section and take the user to a thankyou.html

 

so in logout link take the user to logout.php  write a code to delete session . in logout.php wiret the code header("Location: thankyou.html") this will take the user to thankyou.html

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.