Jump to content
php.lv forumi

Recommended Posts

Posted

Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\up2.php on line 5

 

5rinda;

$id2 = mysql_query("select * from ibf_members where id = ".$_GET['lietotaja_id']."");

Posted

$id2 = mysql_query("select * from ibf_members where id = '.$_GET['lietotaja_id'].'");

Pamegini shadi

Posted (edited)

divas pēdiņas - "" ui, tām pēdiņām jābūt ok. Apskaties, kas ir pirms tās rindiņas un pēc. Iespējams, trūkst kāds semikols.

Edited by marrtins
Posted

$id2 = mysql_query("select * from ibf_members where id = '.$_GET['lietotaja_id'].'");

Pamegini shadi

 

GeRik, pats savā kodā neredzi neko nepareizu?

Posted

To pieprasījumu šādi nebūtu loģiskāk rakstīt?

 

$user_id = $_GET['lietotaja_id'];
$user_id = intval($user_id);
if($user_id>0)
{
	$id2 = mysql_query("select * from ibf_members where id = '$user_id'");
}

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...