Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-07-2008, 03:33 PM
RyanTuosto RyanTuosto is offline
Banned
 
Join Date: Aug 2008
Posts: 8
Rep Power: 0
RyanTuosto is on a distinguished road
Default Form comes back completely blank? Help!

I have a php form mailer on my site.

When I submit a form, even if i leave the fields blank it returns like this:

Code:
Below is the result of your feedback form. It was submitted on Sunday, September 7th, 2008 at 09:15 AM.

Name:
Email:
Company:
etc.
etc.
Basically it returns the form inputs blank.

However this only happens when I fill out the form. It seems I'm getting business on my site but when people fill out the form it comes back only like this:

Code:
Below is the result of your feedback form. It was submitted on Sunday, September 7th, 2008 at 09:15 AM.
It tells me that a form was submitted but not even the blank form input categories come back. Even when I leave the form blank I can't recreate this.

Does anybody know whats going on or can help me?

Thanks in advance,
Ryan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-07-2008, 03:39 PM
Xav's Avatar   
Xav Xav is online now
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,604
Last Blog:
Web slideshow in JavaS...
Rep Power: 77
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Form comes back completely blank? Help!

What's your code?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-07-2008, 03:43 PM
RyanTuosto RyanTuosto is offline
Banned
 
Join Date: Aug 2008
Posts: 8
Rep Power: 0
RyanTuosto is on a distinguished road
Default Re: Form comes back completely blank? Help!

Code:
<?PHP 
$to = "my@email.com";
$subject = "New Order"; 
$headers = "http://www.mockup-markup.com"; 
$forward = 0; 
$location = "yoursite.com";
$timestamp = date('Y-m-d_His');
mkdir('/home/content/r/t/u/rtuosto/html/clients/uploads/' . $timestamp);
$target_file = '/home/content/r/t/u/rtuosto/html/clients/uploads/' . $timestamp . '/' . basename($_FILES['file']['name']);

$date = date ("l, F jS, Y"); 
$time = date ("h:i A"); 




$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n"; 



if ($_SERVER['REQUEST_METHOD'] == "POST") {
    foreach ($_POST as $key => $value) { 
        $msg .= ucfirst ($key) ." : ". $value . "\n"; 
    }
}
else {
    foreach ($_GET as $key => $value) { 
        $msg .= ucfirst ($key) ." : ". $value . "\n"; 
    }
}

mail($to, $subject, $msg, $headers); 
if ($forward == 1) { 
    header ("Location:$location"); 
} 
else { 
} 

if (move_uploaded_file($_FILES['file']['tmp_name'], $target_file)) {
	// Succeeded
	
} else {	
}

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-07-2008, 03:45 PM
Xav's Avatar   
Xav Xav is online now
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,604
Last Blog:
Web slideshow in JavaS...
Rep Power: 77
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Form comes back completely blank? Help!

How about the HTML? Are you giving each control names?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-07-2008, 03:51 PM
RyanTuosto RyanTuosto is offline
Banned
 
Join Date: Aug 2008
Posts: 8
Rep Power: 0
RyanTuosto is on a distinguished road
Default Re: Form comes back completely blank? Help!

you can view the source at Professional Web Design PSD to XHTML Conversion, W3C Valid Code, CSS Table-less Layouts, SEO Management, XHTML, CSS, XML, RSS, Javascript, JQuery Javasript, SEO Keyword Specialist, SEO Ad Campaign Management, Custom Web Design, WordPress, Joomla, Zen

Everything in the form is named.

The form works properly too, I dont know why I'm getting these completely blank submissions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 09-07-2008, 03:54 PM
Xav's Avatar   
Xav Xav is online now
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,604
Last Blog:
Web slideshow in JavaS...
Rep Power: 77
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Form comes back completely blank? Help!

Sorry, I dunno then. Keep working at it, you'll get it eventually.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-07-2008, 03:56 PM
RyanTuosto RyanTuosto is offline
Banned
 
Join Date: Aug 2008
Posts: 8
Rep Power: 0
RyanTuosto is on a distinguished road
Default Re: Form comes back completely blank? Help!

Well I don't really know anything about php, I just copied the script.

Somebody said it might be somebody trying to use GET method to do something to my site?

I'm not really sure but does that mean anything to you?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 09-07-2008, 03:57 PM
Xav's Avatar   
Xav Xav is online now
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,604
Last Blog:
Web slideshow in JavaS...
Rep Power: 77
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Form comes back completely blank? Help!

What does the URL to the PHP script look like? If it has a question mark in it (?) then it's GET.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 09-07-2008, 04:43 PM
chili5's Avatar   
chili5 chili5 is online now
Code Warrior
 
Join Date: Mar 2008
Age: 15
Posts: 3,600
Rep Power: 32
chili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to allchili5 is a name known to all
Default Re: Form comes back completely blank? Help!

Print the elements from your form to the browser to see if it's getting the right data. I think the server is trying to mail GET data, and your form is sending POST data.

Code:
<form action="mailer.php" method="post" id="order" enctype="multipart/form-data">
Check if your getting the correct data by printing to the browser, all of the form data.
__________________
Emo Philips - "My computer beat me at checkers, but I sure beat it at kickboxing."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 09-07-2008, 10:12 PM
RyanTuosto RyanTuosto is offline
Banned
 
Join Date: Aug 2008
Posts: 8
Rep Power: 0
RyanTuosto is on a distinguished road
Default Re: Form comes back completely blank? Help!

How do I print the elements to my browser?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB2008 Tutorial - Print Screen travy92 VB Tutorials 22 11-20-2008 01:02 PM
Coding a change password form InternetGeek Visual Basic Programming 11 02-16-2008 02:53 PM
I only see the same form in all tabs at back end tenawan ionFiles 1 01-14-2008 07:52 AM
Calling a form from another form Void Managed C++ 1 07-01-2006 10:44 AM


All times are GMT -5. The time now is 03:53 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads