Current location: Hot Scripts Forums » Programming Languages » PHP » Blank screen when form is submitted


Blank screen when form is submitted

Reply
  #1 (permalink)  
Old 12-03-04, 08:01 AM
kibby67 kibby67 is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Blank screen when form is submitted

When I hit the form submit button there is a blank screen that comes up. Need some help on figuring this out. My form tag is as follows

<form action="C:\Documents and Settings\my-folder\My Documents\web page info\send.php" method="post" >

my PHP code for send.php is <html>
<head>
<title>Quote</title>
</head>

<body bgcolor="CCCCCC" text="000000" link="330099" vlink="333333">

<table width="100%">
<tr>
<td align="center" >
<td><a href="homepage.html">Home Page</a></td>
<td><a href="aboutus.html">About Us</a></td>
<td><a href="ourservices.html">Our Services</a></td>
<td><a href="ourstaff.html">Our Staff</a></td>
<td><a href="contactus.html">Contact Us</a></td><br />
</td>
</tr>
</table><br /> <br />
<h1><center>Rate Request Form</h1>
<h3> Fields marked (*) must be filled in</h3></center><br /><br /><br />
<form action="C:\Documents and Settings\Lansberry .LANSBERR-11F4I1\My Documents\web page info\send.php" method="post" >
<h3><div><label for="CompanyName">* Company Name: </label>
<input type="text" Name="CompanyName" id="CompanyName" size="30" maxlength="80" /></div><br /><br />
<div><label for="Commodity">* Commodity: </label>
<input type="text" name="Commodity" id="Commodity" size="30" maxlength="80" / ></div><br /><br />
<div><label for="Tonnage">* Expected Tonnage: </label>
<input type="text" name="Tonnage" id="Tonnage" size="30" maxlength="20" /></div><br /><br />
Commodity Destination(not required):<br /><br />
<div><label for="Inbound">Inbound: </label>
<input type="text" name="Inbound" id="Inbound" size="75" maxlength="200" /></div> <br /<br />
<div><label for="Outbound">Outbound: </label>
<input type="text" name="Outbound" id="Outbound" size="75" maxlength="200" /></div><br /><br />
<div><label for="RailService">Is Rail Service Needed?</label><br /><br />
<input type="radio" name="RailService" id="RailService" value="Yes" /> Yes
<input type="radio" name="RailService" id="RailService" value="No" /> No</div><br /> <br />
<div><label for="TruckingRate">Would you also like a quote for us to truck your commodity to it final destination?</label><br /><br />
<input type="radio" name="TruckingRate" id="TruckingRate" value="Yes" /> Yes
<input type="radio" name="TruckingRate" id="Trucking Rate" value="No" /> No</div><br /> <br />
<div><label for="SpecialRequirements">Any Special Requirments? </label> <br />
<textarea name="SpecialRequirements" id="SpecialRequirements" rows="7" cols="60"> </textarea></div><br /><br />
<div><label for="Storage">What type of storage is needed? </label><br /><br />
<input type="radio" name="Storage" id="Storage" value="indoor" /> Indoor Storage
<input type="radio" name="Storage" id="Storage" value="outdoor" /> Outdoor Storage</div><br /><br />
Contact Information<br /><br />
<div><label for="ContactName">* Name: </label>
<input type="text" name="ContactName" id="ContactName" size="30" maxlength="80" /></div><br /><br />
<div><label for="EmailFrom">* Email Address: </label>
<input type="text" name="EmailFrom" id="EmailFrom" size="30" maxlength="80" /></div><br /><br />
<div><label for="PhoneNumber">* Phone Number: </label>
<input type="text" name="PhoneNumber" id="PhoneNumber" size="12" maxlength="12" /></div><br /><br />
<div><label for="FaxNumber">* Fax Number: </lavel>
<input type="text" name="FaxNumber" id="FaxNumber" size="12" maxlength="12" /></div><br /><br />
<div><label for="Confirmation">Would you like a fax or e-mail confirmation of this Rate Quote?</label><br />
<input type="radio" name="Confirmation" id="Confirmation" value="FAX" /> Fax
<input type="radio" name="Confirmation" id="Confirmation" value="E-MAIL" /> E-mail
<input type="radio" name="Confirmation" id="Confirmation" value="NONE" /> None</div><br /><br /><br />
<input type="submit" value="Submit Request" />
</form>

</body>
</html>

The html code and the php code are both in the same folder. I don't have this web site uploaded to a domain yet as I am just now beginning to create it. I don't know to much about PHP. So any help you can give me would be appriciated.
Reply With Quote
  #2 (permalink)  
Old 12-03-04, 08:28 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
php doesn't work locally, you have to upload it to a website. Doesn't have to be the actual domain, but you need it online.
__________________
Yep, it's a signature...
Reply With Quote
  #3 (permalink)  
Old 12-03-04, 08:54 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bizzar528
php doesn't work locally, you have to upload it to a website. Doesn't have to be the actual domain, but you need it online.
false.. i have php installed on my home computer and it works locally.. its just a configuration question just as with the servers.. they dont work eather with wrong config.. the problem here is the action.. you cant use absolute path with php.. and if this code is in that same folder then im wondering if you even have a webserver running on your computer.. with apache default folder they should be in
c:\apache group\apache\(some dir?)\htdocs\
and are called from that folder with
http://localhost/

with IIS the default folder is
c:\inetpub\wwwroot\
and are called with
http://localhost/

so the action cant be the compleate path that you see in my computer.. it should be a relative path or the whole url (http://localhost/scriptname.php)
Reply With Quote
  #4 (permalink)  
Old 12-03-04, 09:20 AM
kibby67 kibby67 is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
okay so how would I find out if I have a webserver running on my computer?
Reply With Quote
  #5 (permalink)  
Old 12-03-04, 09:38 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kibby67
okay so how would I find out if I have a webserver running on my computer?
well.. you do have a standard windows installation.. so if you have not installed a webserver there is no webserver..
another way is to go to control panel -> add remove programs and look if you can find apache there ( with no seperate install its not)
or .. -> add remove windows components and see if "internet information services" is checked ( its not if you havent checked it)
and becourse i think you dont have a webserver i doubt you have php installed cuz that requires a webserver just like any other language that needs to be parsed into html (php, asp, perl, c# etc etc)
Reply With Quote
  #6 (permalink)  
Old 12-03-04, 10:07 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Quote:
okay so how would I find out if I have a webserver running on my computer?
If you have to ask, then you don't. More than likely, your running Windows XP. Either you can try to install IIS, then install some windows PHP client, or you can use some sort of web server software out there if you want to test it locally before uploading it.

I HIGHLY recommend for non-technical people to use something like PHPTriad. It installs Apache, PHP support, and MySQL all in one easy download and install script. You can find it here -- http://sourceforge.net/projects/phptriad/

I've used it before, and it will let you run a site on your computer without too much trouble.
__________________
Yep, it's a signature...
Reply With Quote
  #7 (permalink)  
Old 12-03-04, 10:09 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Quote:
you cant use absolute path with php
this is false as well. I use absolute pathing on a few of my scripts. It gets hairy when your using include statements for your forms and I find it best just to "set and forget" unless there's a problem.

Remember willie, less is more. As a non-tech person, I wouldn't have understand 1/2 of your response.
__________________
Yep, it's a signature...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question- form gets submitted twice jasongr HTML/XHTML/XML 2 09-29-04 02:23 AM
formmail problem gscraper Perl 12 08-27-04 03:06 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
notification email when form submitted? jweav Script Requests 1 01-29-04 03:41 PM
blank screen? darkcarnival PHP 10 11-17-03 06:16 AM


All times are GMT -5. The time now is 05:17 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.