Unexpected T_string
PHP Code:$query = “select * from users where username=’$username’ and password=’$password’”;
Printable View
Unexpected T_string
PHP Code:$query = “select * from users where username=’$username’ and password=’$password’”;
PHP Code:$query = "SELECT * FROM `users` WHERE `username` = '".$username."' AND `password`= '".$password."'";
unexpected t-string again
I fail to see the issue?Quote:
$error = “Bad Login”;
the line before the error:
Quote:
if (mysql_num_rows($result) != 1) {
$error = “Bad Login”;
Use " not “
You're using the wrong symbol...
You're using “ when it's ".
;p thanks guys.
Is it possible using ajax or w.e to submit the form and if successfull show the members navi if not show the login again?
yeah..
You can use scriptaculous ajax.updater and QueryString method.
grr what's wrong with this?
How do i make it so it doesn't show the login after member stuff if there logged in?Quote:
<?
if ($_SESSION['username'] = '".$username."'); {
echo("member stuff.");
}
include("login.html");
?>
You really don't get PHP, lol.PHP Code:<?php
session_start(); // If this is the full document you require session_start
if ($_SESSION['username'] == $username)
{
echo("member stuff.");
}
include("login.html");
?>