Jump to content

Syntax Error in my php. (need help fast please)


Jersey Joe

Recommended Posts

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..

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".

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.