Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 11-22-2007, 11:22 PM Newb Problem
Junior Talker

Posts: 1
Trades: 0
I just started reading a PHP book today, so bare with me.
I am really baffled on why my HTML form is not working.
The form can be found here
Phobia is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-22-2007, 11:35 PM Re: Newb Problem
Extreme Talker

Posts: 201
Name: Brian
Trades: 0
I am struggling with the same thing. once you figure it out let me know .. haha
bdg1115 is offline
Reply With Quote
View Public Profile
 
Old 11-23-2007, 01:05 AM Re: Newb Problem
Junior Talker

Posts: 3
Trades: 0
The post data seems to be correct, firstname=a&lastname=a&email=a&SUBMIT=Submit%21


Are you taking the data in like this:


$firstname = $_POST["firstname"];

?
ohdigeydoc is offline
Reply With Quote
View Public Profile
 
Old 11-23-2007, 03:30 AM Re: Newb Problem
Extreme Talker

Posts: 169
Trades: 0
HandleForm.php:
PHP Code:
<?php
if(isset($_POST['SUBMIT'])){
   echo 
"Welcome ".$_POST['firstname']." ".$_POST['firstname'];
   echo 
"<br>";
   echo 
"Your email address is ".$_POST['email'];
}else{
  echo 
"Please fill your name and email. Go Back...";
}

?>
__________________

Please login or register to view this content. Registration is FREE

TOP 10 WEB HOSTS COMPARED

BEST RESELLER HOSTING
john551 is offline
Reply With Quote
View Public Profile
 
Old 11-23-2007, 08:04 PM Re: Newb Problem
Harlequin's Avatar
Extreme Talker

Posts: 166
Name: Mick
Location: Tenerife
Trades: 0
PHP Code:
if(isset( $Submit 
Harlequin is offline
Reply With Quote
View Public Profile Visit Harlequin's homepage!
 
Old 11-24-2007, 05:45 AM Re: Newb Problem
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
No Harlequin, just:
PHP Code:
if($_POST){ 
will work fine.
__________________
Foundation Flash tutorials :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Old 11-24-2007, 08:13 AM Re: Newb Problem
Super Talker

Posts: 134
Trades: 0
i tried the orignal code on my local server and is working correctly without any errors
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
Old 11-25-2007, 02:30 AM Re: Newb Problem
Extreme Talker

Posts: 169
Trades: 0
Quote:
Originally Posted by Harlequin View Post
PHP Code:
if(isset( $Submit 
Will not work if register_globals off in php.ini
It is a good practice to use $_POST['VARIABLE_NAME']!

Quote:
Foundationflash
$_POST will work fine. But if you have two forms, then the condition will be valid for either of the form submitted.
__________________

Please login or register to view this content. Registration is FREE

TOP 10 WEB HOSTS COMPARED

BEST RESELLER HOSTING
john551 is offline
Reply With Quote
View Public Profile
 
Old 11-25-2007, 08:04 AM Re: Newb Problem
Foundationflash's Avatar
Ultra Talker

Posts: 410
Name: Harry Burt
Location: Colchester, Essex, England
Trades: 0
Yes it would, and I was aware of that. I was going to also point out that Harlequin's required register_globals but I thought I might be wrong about that.
__________________
Foundation Flash tutorials :
Please login or register to view this content. Registration is FREE


New Dreamed Up Web Design:
Please login or register to view this content. Registration is FREE
Foundationflash is offline
Reply With Quote
View Public Profile Visit Foundationflash's homepage!
 
Reply     « Reply to Newb Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.39967 seconds with 12 queries