Jump to content

setting users DOB


runnerjp

Recommended Posts

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 :)

Link to comment
Share on other sites

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]

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.