runnerjp Posted January 31, 2008 Share Posted January 31, 2008 im struggling adding a users dob to a table the format for dob is dob: 0000-00-00 but i want it day-month-year... and on the form all i can think of is <td> <input id="dob" name="dob" type="text" size="25" value="" maxlength="255"></td> </tr> can any 1 point me into a direction to improve this please Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/ Share on other sites More sharing options...
runnerjp Posted January 31, 2008 Author Share Posted January 31, 2008 would also not mind if someone could help me with getting users data,,, i use this to go onto users profile <a href="<?php echo get_username ( $_SESSION['user_id'] ) ; ?>">MyProfile</a>.</td> [/code} thought i could do this to update a users profile so follwing this link [code]<a href=http://www.runningprofiles.com/members/test/update.php?id=$id\">Update</a> and this will send you to update page with <?php /// In order to use this script freely /// you must leave the following copyright /// information in this file: /// Copyright 2006 www.turningturnip.co.uk /// All rights reserved. include("connect.php"); $id = $_GET['id']; $qProfile = "SELECT * FROM users WHERE id='$id' "; $rsProfile = mysql_query($qProfile); $row = mysql_fetch_array($rsProfile); extract($row); $dob = stripslashes($dob); $about_me = stripslashes($about_me); $events = stripslashes($events); $first_name = stripslashes($first_name); $last_name = stripslashes($last_name); mysql_close();?> <form id="FormName" action="updated.php" method="post" name="FormName"> <table width="448" border="0" cellspacing="2" cellpadding="0"> <tr><td width="150"><div align="right"> <label for="dob">dob</label></div> </td> <td> <input id="dob" name="dob" type="text" size="25" value="" maxlength="255"></td> </tr> <tr><td width="150"><div align="right"> <label for="about_me">about_me</label></div> </td> <td> <textarea id="about_me" name="about_me" rows="4" cols="40"><?php echo $about_me ?></textarea></td> </tr> <tr><td width="150"><div align="right"> <label for="events">events</label></div> </td> <td> <input id="events" name="events" type="text" size="25" value="<?php echo $events ?>" maxlength="255"></td> </tr> <tr><td width="150"><div align="right"> <label for="first_name">first_name</label></div> </td> <td> <input id="first_name" name="first_name" type="text" size="25" value="<?php echo $first_name ?>" maxlength="255"></td> </tr> <tr><td width="150"><div align="right"> <label for="last_name">last_name</label></div> </td> <td> <input id="last_name" name="last_name" type="text" size="25" value="<?php echo $last_name ?>" maxlength="255"></td> </tr> <tr> <td width="150"></td> <td><input type="submit" name="submitButtonName" value="Update"><input type="hidden" name="id" value="<?php echo $id ?>"></td> </tr> </table> </form> but i get the error Warning: extract() [function.extract]: First argument should be an array in /home/runningp/public_html/members/test/update.php on line 14 i belive this is because it has not found the suers id... is this correct?? if so can i fix this[/code] Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/#findComment-454457 Share on other sites More sharing options...
runnerjp Posted January 31, 2008 Author Share Posted January 31, 2008 gttin to grip with things but can sumbody help me with this line <td><a href="<?php echo "<a href=\"test/update.php?id=$id\; ?>">Update</a> .</td> Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/#findComment-454557 Share on other sites More sharing options...
haku Posted January 31, 2008 Share Posted January 31, 2008 The output of that line of code is going to be: <a href=<a href="test/update.php?id=__">Update</a>. Thats no good. Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/#findComment-454564 Share on other sites More sharing options...
runnerjp Posted January 31, 2008 Author Share Posted January 31, 2008 so how can i chnage it to be http://mywebsite.com/members/test/update.php?id=?? Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/#findComment-454710 Share on other sites More sharing options...
runnerjp Posted January 31, 2008 Author Share Posted January 31, 2008 bmp Quote Link to comment https://forums.phpfreaks.com/topic/88731-setting-users-dob/#findComment-454807 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.