elo, as the title suggests i'm trying to pass values from form to form,
example - the user clicks on a picture - a string is compiled and the form opens a second php file and places the string into a text box (can be anything that displays the string but the string must be displayed). - on the second form the user enters some details into a text box, example their name and then presses a submit button - a third form processes the information.
i've copied the code lines i have below (it was all nested inside tables which i've removed this - i hope i haven't wiped any of the critical stuff though!).
first php file, (example pictures with hyperlinks)
<html>
<head>
..blah..blah..
<head>
<body>
..blah..blah..
<a title="click here to enter the picture name into text box on secondfile!" onmouseover="javascript:pic(2)"> <href="http://www.mydomain.co.uk/secondfile.php" >
<img src="http://www.mydomain.co.uk/imagefile.gif" border="0" width="29" height="20"></a>
..blah..blah..
<script type="text/javascript">
function pic1(){
$picname="pic1" ;}
function pic2(){
$picname="pic2" ;}
function pic(num){
$picname="pic".num ;}
</script>
<input type="hidden" value="firstphp" name="fromphpfile1">
<input type="hidden" value="<?=$picname?>" name="thispic">
</body>
</html>
secondfile.php - file, (example - contains input text boxes and submit button)
<html>
<form action="http://www.mydomain.co.uk/processuserchoice.php" method="post" name="ChoiceandDetailsForm" id="ChoiceandDetailsForm">
<input name="usersname" type="text" size="35">
<input name="userschoice" type="text" value="<?= $_POST['thispic'] ?>" size="35">
<input type="submit" VALUE="Submit">
<script type="text/javascript">
document.ChoiceandDetailsForm.usersname.focus();
</script>
</html>
processuserchoice.php - the third php file (example - the emailer!)
<?
echo $_POST['usersname']." has chosen ".$_POST['userschoice'];
?>
i suspect that i am not 'posting' from the first file - but i've tried messing by swapping the
<href="http://www.mydomain.co.uk/secondfile.php" >
with
<form action="http://www.mydomain.co.uk/secondfile.php" method="post" name="userschoice" id="userschoice">
but that did not work either!
any clues would be very much appreciated, cheers