note 94918 deleted from function.parse-url by danbrown

From: Date: Wed, 02 Dec 2009 21:10:40 +0000
Subject: note 94918 deleted from function.parse-url by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163507@lists.php.net to get a copy of this message
Note Submitter: simplyunique69 at hotmail dot com ---- Hi everyone after reading through all the comments and trying out a number of things im still not completely sure on if my php script is possible. basically i am making a website for my company which lists jobs and i would like to be able to click on a job number and have it retrieve all the original information about that job to the job form so that it can be changed or updated. basically i have this. echo "<table border='1'>"; echo "<tr> <th><a href='".$link."'>Date</a></th> <th><a href='".$link."'>Job Number</a></th> <th><a href='".$link."'>Description</a></th> <th><a href='".$link."'>Customer</a></th> <th><a href='".$link."'>Contact Name</a></th> <th><a href='".$link."'>Responsible</a></th></tr>"; while($row = mysql_fetch_array( $result )) { $link = 'details.php?jobnumber=' . $row['jobnumber']; echo "<tr><td>"; echo $row['date']; echo "</td><td>"; //echo $row['jobnumber']; echo "<a href='".$link."'>".$row['jobnumber']."</a>"; echo "</td><td>"; echo $row['requirements']; echo "</td><td>"; echo $row['customer']; echo "</td><td>"; echo $row['contactname']; echo "</td><td>"; echo $row['responsible']; echo "</td></tr>"; } echo "</table>"; now this table makes it so all the "jobnumber" rows are clickable it then sends you to details.php?jobnumber=3306 (3306 is the job number it changes depending on which 1 you click) this is where i get stuck. i have created a full update job form which if i add all the fields in and press update it works perfectly fine BUT because it doesnt automatically bring the original information out some fields can be left blank meaning when update is clicked it wipes out that field in the database meaning data lost. so basically what im trying to get at is how can i make 'details.php' look at the section of the url that changes and then ask mysql for the data that the jobnumber presented has. from there i can manipulate it to go into the fields needed. Thanks for reading ive only been trying to learn php for about 3 weeks so try not to give me a hard time.

« previous php.notes (#163507) next »