I'm probably doing things the hard way but they work.. Here's the scenario in abbreviated form...
1. input form page script
Code: Select all
<form method=GET action='GO.php'>
<input type='text' name='last_name' method='GET'>
<input type ="submit" value="Do it">2. intermediate script – GO.php
Code: Select all
<?
session_start();
$_SESSION['last_name'] = $_GET[last_name]; // need this for use in script #3
header( 'Location: /show_results.php' ) ;
?>[after connecting to mysql]
Code: Select all
$last_name= $_SESSION['last_name];The #1 script lets me input some last_name and when submitted calls script #2 which stuffs the GET data into the session variable and then loads script #3 which looks up the last_name in mysql and displays and related fields. However script #3 is opening in the same window and I would like it to open in a new window. I understand that the header function won't do that and I need to use JavaScript to open a new window but not sure where to put what. Also, I think I should be able to combine scripts 1 and 2 into one script but not sure how.
Help would be appreciated.
Yes, I know I could avoid script 2 by passing the GET vartble directlly to script 3. If asked I'll explain why I have to use the session variable.
scottayy | Please use the
Code: Select all
Code: Select all
and [syntax..] tags when posting code.[/color][/b]