script from php 4.0 to 4.3

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
dizeta
Forum Commoner
Posts: 47
Joined: Mon Feb 02, 2004 9:53 am

script from php 4.0 to 4.3

Post by dizeta »

hi,

I am new in PHP, and trying to understand something...
i've this script that works with php ver. 4.0, but not with 4.3(installed on my pc).

session.php:

Code: Select all

<?
session_start(); 
//dbconnect(); 
if (!isset($verified_user)) $verified_user=''; 
if ($action=='login') &#123; 
$result=mysql_query("SELECT id_utente FROM utenti WHERE username='&#123;$username&#125;' AND password='&#123;$password&#125;'"); 
if (mysql_num_rows($result)>0) list($verified_user)=mysql_fetch_row($result); 
else $verified_user=''; 

$_SESSION&#1111;"verified_user"]; 
$_SESSION&#1111;"id_user"]=$verified_user;
if ($verified_user == '') header("location: error.htm"); &#125;
?>
how i've to do to make it works?
(see $username and $password....)

thanks to all
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Post Reply