Jump to content

Recommended Posts

Perhaps my eyes or tired or I am just being stupid, but I can see my parse error!

 

<?php
session_start();

include('include/database.php');

$sql = "SELECT * FROM user WHERE userid='" . mysql_escape_string($_POST['userid'])'";
$result = mysql_query($sql, $link) or die("There was an error while trying to get your information.\n<!--\n" . mysql_error($link) . "\n-->");
if(mysql_num_rows($result) < 1)
{
    $_SESSION['SESS_USERID'] = $_POST['userid'];
    redirect('index.php?p=signup');
}
$_SESSION['SESS_USERID'] = mysql_result($result, '0', '	userid');
$_SESSION['SESS_BANDNAME'] = mysql_result($result, '0', 'bandname');
$_SESSION['SESS_USERNAME'] = mysql_result($result, '0', 'username');


?>

 

Its on line 10 which is:

 

 $_SESSION['SESS_USERID'] = $_POST['userid'];

 

Anyone see it?

Link to comment
https://forums.phpfreaks.com/topic/153745-solved-quickie-cant-spot-parse-error/
Share on other sites

$sql = "SELECT * FROM user WHERE userid='" . mysql_escape_string($_POST['userid']) . "'";

 

$_SESSION['SESS_USERNAME'] = mysql_result($result, '0', 'username');

 

Syntax error, get a program that highlights your code and it will be easy to see (as it is plain as day in this forum).

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.