•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,611 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,628 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 295 | Replies: 6
![]() |
•
•
Join Date: Aug 2007
Posts: 147
Reputation:
Rep Power: 0
Solved Threads: 0
Hi.
I have two forms with the following names and properties:
1. register.php --- ----- action="register-exec.php" --- method="POST"
2. register-exec.php --- action="register-exec.php" --- method="POST"
After submitting the register.php, I used session in register-exec.php to store the value of the register.php for later use as follow:
Then after submitting the register-exec.php, I wanted to use those session variables, as follow:
None of them work?
what is wrong ???
I have two forms with the following names and properties:
1. register.php --- ----- action="register-exec.php" --- method="POST"
2. register-exec.php --- action="register-exec.php" --- method="POST"
After submitting the register.php, I used session in register-exec.php to store the value of the register.php for later use as follow:
session_start(); $_SESSION['bookTitle'] = $_POST['txtBookTitle']; $_SESSION['bookInfo'] = $_POST['txtBookInfo'];
Then after submitting the register-exec.php, I wanted to use those session variables, as follow:
if( isset($_POST['register-exec']) ){
echo $bookTitle;
echo $_SESSION['bookTitle'];
}None of them work?
what is wrong ???
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
I hope you have session_start in all the required pages. If so, you can try to print out the session variables first, to see if it really has the values.
Try
Try
print_r($_SESSION);
in all the pages and check if the session variables are really storing any values. Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 522
Reputation:
Rep Power: 2
Solved Threads: 53
•
•
Join Date: Jul 2008
Location: Hyderabad,India.
Posts: 522
Reputation:
Rep Power: 2
Solved Threads: 53
You have to use this code in register.php
Try this ...
Try this ...
php Syntax (Toggle Plain Text)
session_start(); $_SESSION['bookTitle'] = $_POST['txtBookTitle']; $_SESSION['bookInfo'] = $_POST['txtBookInfo'];
Last edited by peter_budo : Jul 7th, 2008 at 6:46 am. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- I can i build a customiseable form for internet user? (PHP)
- Populating form with existing MySQL data (PHP)
- POST with header (PHP)
- Getting a value into HTML form. (Perl)
- get posted form data in python (Python)
- Populating a fields on a form base on a selected item from a droplist. (PHP)
- Zend PHP Certification (PHP)
- BASIC FORM problems... (PHP)
- Ie Variable Passing Problem**please Help** (Web Browsers)
Other Threads in the PHP Forum
- Previous Thread: php text file read with specify area
- Next Thread: updating multiple columns in single MySQL table



Linear Mode