Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 01:13 am EDT

Geeklog Forums

Can staticpages pass values to each other?


George

Anonymous
dizzy
Hello - I am trying to use staticpages to do a form/PHP script operation. The staticpages don't seem to be passing the values from the form on staticpage1, HTML only, which calls staticpage2, PHP execute, in the form action.

Can this be done, or is there a better way to accomplish this goal? I am trying to simply let the user insert and read/display values from a database (not the GL database). Not too experienced with PHP.

Thanks... (GL 1.40sr2)
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Just use the global $_POST array - your form values should be in there.

bye, Dirk
 Quote

George

Anonymous
Hmm.. can you expand a little on that? I examined the $_POST array and it seemed to be empty.

Here's the calling HTML:
Text Formatted Code

 <form action ="/staticpages/index.php/findphp" method = "post" >
Enter SSAN:<br>
<input name = "ssan" type = text>
<br>
<input type = submit value = "Find">
</form>

 


And here's the recieving PHP:
Text Formatted Code


if (!$ssan)
 { echo "Nothing entered!";
    //exit;
}
echo $ssan;

 


Just a simple test to get it going.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Try $_POST['ssan'] ...

bye, Dirk
 Quote

George

Anonymous
excited
That's got it.... Razz Thanks very much!

 Quote

All times are EDT. The time is now 01:13 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content