Thanks for the response! I've looked into them (tizag) but it was to basic. I understand how the session() works, but how to use it is another story.
I see that he was trying to assign variable to it that fines but i want to assign a session id. is that auto generated through your web server or can you call it from the database?
here is the sample code so far.
i'm query the database for data to be displayed on the page in this .php.
editPage.php
-
<?php
-
$extra = "testProfile.php";
-
$dom = "xxxx";
-
header("Location: http://localhost/$dom/$extra");
-
?>
-
<html>
-
<head>
-
<title>Really Simple CMS</title>
-
</head>
-
<body>
-
<h1>Really Simple CMS</h1>
-
<?php
-
mysql_connect("localhost", "xxxx", "xxxx");
-
$result = @mysql_query("SELECT contents from cms.page");
-
while ($row = mysql_fetch_assoc($result)){
-
$contents = $row['contents']; // Do not change these to angle brackets
-
}
-
//exit;
-
?>
-
<form name="form1" method="post" action="updatePage.php">
-
<br />Enter page content:<br><textarea rows="10" cols="60" name="contents"><?php echo "$contents" ?></textarea>
-
<input type="submit" name="Submit" value="Update Page">
-
</form>
-
<?php
-
exit;
-
?>
-
</body>
-
</html>
this one processed the data update.php
- <?php
-
$contents=$_REQUEST['contents']; // Do not change to angle brackets
-
mysql_connect("localhost", "xxxx", "xxxx");
-
$result = @mysql_query("UPDATE cms.page SET contents='$contents'");
-
mysql_close();
-
?>
---------------------------------------------------------------------------------
this is the form that is called by redirect in edit.php
this created the new form layout for that query, but instead of parsing data through out pages, i would like to use session.
Thanks, in advance for you help.
- <?php
-
// create the file to open to process the data
-
$test = "X:\\xxxx\\htdocs\\xxxx\\test.php";
-
$t1 = fopen($test, 'w' ) or die ( "can not create file");
-
// send the data to the file including layout
-
$stringData = "X:\\xxxx\\htdocs\\xxxx\\testFile.txt";
-
fwrite($t1, $stringData);
-
//close stream
-
fclose($t1);
-
//exit;
-
?>