thorpe wrote:Um.... echo()
echo 'Welcome '.$user_name;
I am not quite THAT noobish :p
POST and SESSION didn't work either.. Here's a portion of the script which takes two variables from the preceding form:
<?
include ("config.php");
$user_name=$_POST['user_name'];
$user_password=$_POST['user_password'];
$query="SELECT * FROM users WHERE user_name='$user_name' and user_password='$user_password'";
$result=mssql_query($query);
$count=mssql_num_rows($result);
if($count==1){
session_register("user_name");
header("location:../index.php");}
else {
echo '<font color="red"><b>Wrong Username or Password</b></font>';}
?>