i don't how to to fix this i'm trying for 3 days and i can't find the problem .... why
PHP CODE DATA.PHP
<?php
session_start();
function llogedin(){
if (isset($_SESSION['server'])&& !empty ($_SESSION['Server']))
{ return true;}
else
{return false;}
}
$_SESSION['server']=$Server;
//Variablat per mu kyq ne SQLEXPRESS
$Server = $_POST['Server'];
$Username = $_POST['Username'];
$Password = $_POST['Password'];
//FUKSIONI KU JON TE DEKLARUME VARIABLAT PER LOG QASJE NE MSSQL
function con()
{ global $Server,$Username,$Password,$con ;
$con = mssql_connect ($Server,$Username,$Password) or die ("Wrond");
}
con();
mssql_select_db('Project1', $con);
$_SESSION['Server']=$Server;
header("Location: update.html");
?>
UPDATE.PHP
<?php
//session_start();
require 'C:\AppServ\www\1\data.php';
//include 'C:\AppServ\www\1\data.php';
if (isset($_SESSION['server'])&& !empty ($_SESSION['Server']))
{ echo 'Welcome , '.$_SESSION['server'];}
else
{echo 'Please log in.';}
if(!isset($_SESSION['server']))
{
die("To access this page, you need to <a href='login.php'>LOGIN</a>"); // Make sure they are logged in!
}
//procedura n'SQL per futjen e te dhenave si FName LName edhe PHON
$proc = mssql_init('dbo.insert_in_example',$con);
mssql_bind($proc,'@FName',$FName,SQLVARCHAR);
mssql_bind($proc,'@LName',$LName,SQLVARCHAR);
mssql_bind($proc,'@PHON',$PHON,SQLVARCHAR);
$result=mssql_execute($proc);
do {
while ($row = mssql_fetch_array($result)) {
echo "$row[0] -- $row[1] -- $row[2] -- $row[3]<BR>";
}
} while (mssql_next_result($result));
mssql_free_result($result);
?>
HTML CODE DATA.HTML
<html> <head> <title>Login</title> </head> <body> <form method = "post" action ="data.php"> <table border="5"><td> Server :<br/> <input type="text" name="Server" size="30" /> <br/> Username :<br/> <input type="text" name="Username" size="30" /> <br/> Password :<br/> <input type="text" name="Password" size="30" /> <br/> <input type="submit" value="Log In" /> </td> </table> </form> </body> </html>
update.html
<html> <head> <title>Update</title> </head> <body> <form method = "post" action ="update.php"> <table border="5"><td> Name :<br/> <input type="text" name="FName" size="30" /> <br/> Last Name :<br/> <input type="text" name="LName" size="30" /> <br/> Phone Nr. :<br/> <input type="text" name="PHON" size="30" /> <br/> <input type="submit" value="Update" /> </td> </table> </form> </body> </html>
I put all the files in there is anybody that can help me to solve this problem .
Attached File(s)
-
data.php (641bytes)
Number of downloads: 27 -
update.html (430bytes)
Number of downloads: 28 -
data.html (437bytes)
Number of downloads: 23 -
update.php (926bytes)
Number of downloads: 26

New Topic/Question
Reply



MultiQuote







|