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.. Quote 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". Quote 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')); Quote 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 Quote 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... Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.