Could someone please advise me why am I getting this error -
FATAL ERROR -Call to Undefined Function (Session_Start in /srv/www.htdocs/xxx/xx/indexyy.php)
I got this error when I installed and integrate my system at my client's OES server. It seem to work fine when I tested it from Windows platform.
Could it be due to different version of PHP (mine at office is version 5, whereas client's OES PHP is version 4) ?
Otherwise why can't the OES recognise the session_start function ?
Help me I'm stuck...I'm a fresh grad and this is my first system, just my lucky star that I got involved with OES and I can't help feeling like a little lost lamb....
Anyways, I put the session_start function right at the top of my coding as below:-
Code: Select all
<?
session_start();
<?
if(!isset($username) | !isset($password)) {
// escape from php mode.
?>
<form action="<?=$PHP_SELF?><?if($QUERY_STRING){ echo"?". $QUERY_STRING;}?>" method="POST">
session_register("username");
session_register("password");
$db="xx";
$con=mysql_connect("localhost","root","");
mysql_select_db($db,$con);
$sql = mysql_query("SELECT password, MD5(UNIX_TIMESTAMP() + id + RAND(UNIX_TIMESTAMP())) GUID FROM login WHERE username = '$username'",$con);
$fetch_em = mysql_fetch_array($sql);
$numrows = mysql_num_rows($sql);
if($numrows != "0" & $password == $fetch_em["password"]) {
$valid_user = 1;
//$psRefer='index.php';
include('index.php');
}
else {
$valid_user = 0;
}Cheers
ReAnA
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]