Jersey Joe Posted October 4, 2010 Share Posted October 4, 2010 Ok here is the error I am getting... Warning: date() expects parameter 2 to be long, string given in /home/a8875754/public_html/admin/pages/edit_members.php on line 191 and this is line 191 of my code... <tr bgcolor="<?php echo $bgcolor; ?>"><td style="text-align:left; border:solid 1px #B30401; padding:3px;"> <span style="float:left;"><strong><?php echo $username; ?></strong> Joined: <strong><?php echo date("M Y",$joined); ?></strong> Usergroup: <strong><?php echo $rank_name['usergroup_name']; ?></strong> </span><span style="float:right;"><a href="index.php?p=edit_members&action=edit&id=<?php echo $id; ?>"> <img src="images/icons/edit_small.png" title="Edit <?php echo $username; ?>" alt="Edit <?php echo $username; ?>"/></a> I can't find the error.. can you? if needed I can post the entire edit_member.php code.. Link to comment https://forums.phpfreaks.com/topic/215094-syntax-error-in-my-php-need-help-fast-please/ Share on other sites More sharing options...
jcbones Posted October 4, 2010 Share Posted October 4, 2010 Warning: date() expects parameter 2 to be long, string given in /home/a8875754/public_html/admin/pages/edit_members.php on line 191 Judging by that, you need to look at the use of the date function. You have used the variable $joined in that function as the 2nd parameter. You should therefore look at how you define the variable $joined, and make sure it is a long number instead of a string, as that is the error that is printed back to you on the screen. Being that we have no idea what the variable $joined holds, that is all the help we can give you "quick". Link to comment https://forums.phpfreaks.com/topic/215094-syntax-error-in-my-php-need-help-fast-please/#findComment-1118755 Share on other sites More sharing options...
Jersey Joe Posted October 4, 2010 Author Share Posted October 4, 2010 $joined = date("M Y",mysql_result($result, $i, 'joined')); Link to comment https://forums.phpfreaks.com/topic/215094-syntax-error-in-my-php-need-help-fast-please/#findComment-1118764 Share on other sites More sharing options...
kenrbnsn Posted October 4, 2010 Share Posted October 4, 2010 Since "$joined" is already the string you want, just use it: <span style="float:left;"><strong><?php echo $username; ?></strong> Joined: <strong><?php echo $joined; ?></strong> Usergroup: <strong><?php echo $rank_name['usergroup_name']; ?></strong> Ken Link to comment https://forums.phpfreaks.com/topic/215094-syntax-error-in-my-php-need-help-fast-please/#findComment-1118767 Share on other sites More sharing options...
Jersey Joe Posted October 4, 2010 Author Share Posted October 4, 2010 Thanks Ken that worked perfectly... Link to comment https://forums.phpfreaks.com/topic/215094-syntax-error-in-my-php-need-help-fast-please/#findComment-1118769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.