Hello,

i am trying to create a script that will allow me to visit a page and enter some information and when i click submit it will send that data to anther page,

i have managed to do it with a http link,

but my question is how to keep the writing on that page, ?
im currently using

test1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<a href="test1.php?first_name=Shaun&last_name=Morgan">Test Page 1</a> 
</body>
</html>

and test1.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php 

$first_name = $_GET['first_name'];

$last_name = $_GET['last_name'];

echo $first_name;

echo $last_name;

?> 

</body>
</html>

i want to visit the page test.php enter some info and when i vist test1.php at a later date it still has the information

I would suggest using $_SESSSION and so forth. And just like any webstie that has a login, just have a timeout or log out script to destroy the session.

im not using this script as a login script,

im using this as a competition system for opencart,

using a standard html page to enter the question and set the answer and the send it through to anther page were my customer can see the question i have set

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.