Discussion Locked

Problem with PHP script

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a PHP Script for user registration having a form whose method attribute is set to post and has ACTION="" . The name of the submit button is "submit_button".The form is intended to collect information from online users and post the same in a table called register built in MYSQL. The problem is that on submitting the form i am getting an error of 'Undefined variable "submit_button". I am using PHP4. The same script was working fine with php3. I have also tried using $_POST["submit_button"]. But that too did not work.
Please help.
Thanx
Anna

3 replies

by rakeshkanojia

If your are using the variable from a diff function / procedure then you need to define a global variable
E.g.
**********
global $submit_button;
**********

Then you can use the below line
**********
$comment_bt = $_POST['comment_bt'];
**********

Hope this helps

Take Care

This discussion is closed to new replies.