Guest kilbad Posted August 3, 2006 Share Posted August 3, 2006 I have been doing this tutorial at freewebmasterhelp.com. However, while I understand the logic of the seventh tutorial page (http://www.freewebmasterhelp.com/tutorials/phpmysql/7), I am getting errors when I write up the scripts it describes.Could someone help me... specifically, I need the full code to the couple of scripts described on that page (for Updating & Deleting database entries)? I just cannot seem to get them right like I did pages 1-6. ???Regardless, thank you for your time and consideration!Brendan Link to comment https://forums.phpfreaks.com/topic/16402-help-with-one-step-of-outside-tutorial/ Share on other sites More sharing options...
extrovertive Posted August 3, 2006 Share Posted August 3, 2006 well, what have you wrote? Link to comment https://forums.phpfreaks.com/topic/16402-help-with-one-step-of-outside-tutorial/#findComment-68394 Share on other sites More sharing options...
Guest kilbad Posted August 3, 2006 Share Posted August 3, 2006 [code]<?php$id=$_GET['id'];$username="username";$password="password";$database="your_database";mysql_connect(localhost,$username,$password);$query=" SELECT * FROM contacts WHERE id='$id'";$result=mysql_query($query);$num=mysql_numrows($result);mysql_close();$i=0;while ($i < $num) {$first=mysql_result($result,$i,"first");$last=mysql_result($result,$i,"last");$phone=mysql_result($result,$i,"phone");$mobile=mysql_result($result,$i,"mobile");$fax=mysql_result($result,$i,"fax");$email=mysql_result($result,$i,"email");$web=mysql_result($result,$i,"web");<form action="updated.php" method="post"><input type="hidden" name="ud_id" value="<? echo $id; ?>">First Name: <input type="text" name="ud_first" value="<? echo $first; ?>"><br>Last Name: <input type="text" name="ud_last" value="<? echo $last; ?>"><br>Phone Number: <input type="text" name="ud_phone" value="<? echo $phone; ?>"><br>Mobile Number: <input type="text" name="ud_mobile" value="<? echo $mobile; ?>"><br>Fax Number: <input type="text" name="ud_fax" value="<? echo $fax; ?>"><br>E-mail Address: <input type="text" name="ud_email" value="<? echo $email; ?>"><br>Web Address: <input type="text" name="ud_web" value="<? echo $web; ?>"><br><input type="Submit" value="Update"></form>++$i;}?>[/code] Link to comment https://forums.phpfreaks.com/topic/16402-help-with-one-step-of-outside-tutorial/#findComment-68541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.