Jump to content

syntax error, unexpected '['


jarv

Recommended Posts

can someone please help me, I get syntax error, unexpected '[' in my page

here is my code:

 


$query1 = "SELECT * FROM members WHERE rsUser = '".$rsUser."' AND rsPass = '".$rsPass."'";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_array($result1);


$_SESSION['USERID']=row1['USERID'];
$_SESSION['RSPOSTCODE']=row1['RSPOSTCODE'];
$_SESSION['RSEMAIL']=row1['RSEMAIL'];
$_SESSION['RSUSER']=row1['RSUSER'];

$pSQL = "INSERT INTO favepub_COPY (USERID,PUBID)"
$pSQL = $pSQL."SELECT ".$_SESSION["USERID").", PUBID "
$pSQL = $pSQL."FROM pubs "
$pSQL = $pSQL."WHERE left(rsPostCode,4) = '".$_SESSION["RSPOSTCODE")."'"

Link to comment
https://forums.phpfreaks.com/topic/219893-syntax-error-unexpected/
Share on other sites

Your syntax error should be gone

<?php
$query1 = "SELECT * FROM members WHERE rsUser = '".$rsUser."' AND rsPass = '".$rsPass."'";
$result1 = mysql_query($query1);
$row1 = mysql_fetch_array($result1);


$_SESSION['USERID']=row1['USERID'];
$_SESSION['RSPOSTCODE']=row1['RSPOSTCODE'];
$_SESSION['RSEMAIL']=row1['RSEMAIL'];
$_SESSION['RSUSER']=row1['RSUSER'];

$pSQL = "INSERT INTO favepub_COPY (USERID,PUBID)"
$pSQL = $pSQL."SELECT ".$_SESSION["USERID"].", PUBID "
$pSQL = $pSQL."FROM pubs "
$pSQL = $pSQL."WHERE left(rsPostCode,4) = '".$_SESSION["RSPOSTCODE"]."'"
?>

 

 

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.