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

Link to comment
Share on other sites

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
Share on other sites

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