Copy link to clipboard
Copied
I am using php and mysql for this application.
<?php
include_once('config.php');
$user = $_POST['username'];
$pass = md5($_POST['password']);
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
$sql = "SELECT usr_id FROM $tb_users WHERE usr_username = '$user' and usr_password = '$pass'"; //line 12
$result = @mysql_query($sql,$connection) or die(mysql_error());
$num_rows = mysql_num_rows($result);
?>
I am getting the following error:
Parse error: syntax error, unexpected '=' in /home/admin/public_html/SMET/scripts/config.php on line 12
I can not locate the issue where this problem is occurring, any help would be appreciated.
p.s. Also I just included the portion of code that is effected on my script and marked line 12 as a comment.
~justin
It's telling you the error is in config.php. You should post the contents of that script instead.
Copy link to clipboard
Copied
It's telling you the error is in config.php. You should post the contents of that script instead.
Copy link to clipboard
Copied
forgot to place a $ sign on a variable in my config file. Didn't even look at it closely...Thank you
Find more inspiration, events, and resources on the new Adobe Community
Explore Now