Jump to content

Recommended Posts

I have two files search.php and update.php, i have a combo box which is populated with a list of organizations and a search button on search.php and a detail form on update.php.

Now I want to code the search button such that when i select an organization and click on the search buttom, details of the selected organization will pupolate the form on update.php.

Basically i want to send the information on the search.php to the update.php so that i can use it to retrieve detail information on the update.php

 

Help need urgently

Well if you have a bunch of variables you would like to transfer from one script/page to another you could use sessions...

 

 

search.php

<?php
//Start a session
session_start();

$name = "Some Name";
$email = "your@email.com";

//Store the variables as session variables
$_SESSION['name'] = $name;
$_SESSION['email'] = $email;
?>

 

 

update.php

<?php
//Start a session
session_start();


echo $_SESSION['name']; //Will print "Some Name"
echo $_SESSION['email']; //Will print "your@email.com"

?>

 

That's a simple transfer of variables from one page to another... if that's not what you meant please specify your problem :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.