Msg#: 7445 posted 11:03 am on Mar 22, 2005 (gmt 0)
Sorry if this has been asked before (I did do a search first!)
I have setup an sql table containing project data (job no, description, date and auto-number id) which displays in rows on my main page. Next to each project is a link which a user can click to submit their details to show interest in that particular project. When they click this link they are taken to another page with a contact form, but I need to automatically show the job no of the project they selected in this form. I have successfully got the job no for the 1st record in the table into the field but need to make it dynamic.
How do I get the correct job no according to the link they click?
Msg#: 7445 posted 11:55 am on Mar 22, 2005 (gmt 0)
it appears you need to pass some data in the actual link. You can accomplish this by passing arguments on the link like ...
then on the newpage.php, add code that would check for the value of the query string using $_GET; e.g. $_GET['var'] and $_GET['row'] from here you can add your script on what you want to do with the data passed on the link.
It may not be the best way to do it, and certainly not the only way...but when I was there, this is how I solved the problem. (I also put in a check for control characters in the variables on each page...but I couldn't get any through anyway when I was testing)