Free Web Hosting Forum
(#1 (permalink))
Old
Member
danielsdem is on a distinguished road
 
Posts: 63
Join Date: Jun 2008
Default No form results - 08-14-2008, 02:17 PM

Hi

Have a problem here: just made a simple form in my localhost and works correclty. But after uploading files the results after submitting do not appear in my database. No errors shown after submit button is pressed and in database all spaces except date are empty.

Why is that? Thanks.
here is the link to the form:

http://encuestacoches.net76.net/index.php?page=encuesta

Last edited by danielsdem : 08-14-2008 at 02:22 PM.
Reply With Quote
(#2 (permalink))
Old
Member
danielsdem is on a distinguished road
 
Posts: 63
Join Date: Jun 2008
Default 08-14-2008, 05:12 PM

nobody knows a solution?
Reply With Quote
(#3 (permalink))
Old
Bad Karma[CORE]'s Avatar
Senior Member
Bad Karma[CORE] is on a distinguished road
 
Posts: 728
Join Date: May 2008
Default 08-14-2008, 05:15 PM

you have to admit that posting the code that is supposed to write the form data into the database would be helpful for troubleshooting, donīt you ?

How do you expect people to troubleshoot code problems without knowing the code ?
Reply With Quote
(#4 (permalink))
Old
Member
danielsdem is on a distinguished road
 
Posts: 63
Join Date: Jun 2008
Default 08-14-2008, 05:37 PM

i dont think the problem is in the code... it works prefectly on my localhost.
Why doesn't it work after upload?
Reply With Quote
(#5 (permalink))
Old
lenwhistler's Avatar
Senior Member
lenwhistler is on a distinguished road
 
Posts: 148
Join Date: Jul 2008
Location: Vancouver, Canada
Default 08-14-2008, 05:50 PM

Quote:
Originally Posted by danielsdem View Post
i dont think the problem is in the code... it works prefectly on my localhost.
Why doesn't it work after upload?
Does it create a new row each time you submit the form?

Check the USER, PASSWORD, HOST and NAME values in your database connection file. Some or all of those values will be different for 000webhost.


----
Reply With Quote
(#6 (permalink))
Old
Bad Karma[CORE]'s Avatar
Senior Member
Bad Karma[CORE] is on a distinguished road
 
Posts: 728
Join Date: May 2008
Default 08-14-2008, 05:51 PM

Quote:
Originally Posted by danielsdem View Post
i dont think the problem is in the code... it works prefectly on my localhost.
Why doesn't it work after upload?
show us the code already
Reply With Quote
(#7 (permalink))
Old
Member
danielsdem is on a distinguished road
 
Posts: 63
Join Date: Jun 2008
Default 08-14-2008, 06:41 PM

Quote:
Originally Posted by lenwhistler View Post
Does it create a new row each time you submit the form?

Check the USER, PASSWORD, HOST and NAME values in your database connection file. Some or all of those values will be different for 000webhost.


----
everything is OK. Every time I submit the form a new row appears, but it is empty. I also tried to save data without mysql, into a .txt file. But the same thing: empty lines.

here is how the form is processed:

PHP Code:
<?php
include("config.php");
mysql_connect($dbhost,$dbuser,$dbpass);
@
mysql_select_db($dbname) or die( "Unable to select database"); 
$date date('Y-m-d H:m:s');
$query "INSERT INTO $resultados VALUES ('','$ciudad','$edad','$coche','$modelo','$cilindrada','$combustible','$km','$compradopor','$gustando','$cambiar','$date')";
mysql_query($query);
mysql_close();
echo 
header("Location: index.php?page=gracias");
?>
Reply With Quote
(#8 (permalink))
Old
lenwhistler's Avatar
Senior Member
lenwhistler is on a distinguished road
 
Posts: 148
Join Date: Jul 2008
Location: Vancouver, Canada
Default 08-14-2008, 06:55 PM

  • You are missing all the $edad = $_POST['edad'];. You need about 10 of those.
  • The date is working because it is on line 5.



----------------

Last edited by lenwhistler : 08-14-2008 at 07:02 PM.
Reply With Quote
(#9 (permalink))
Old
Member
danielsdem is on a distinguished road
 
Posts: 63
Join Date: Jun 2008
Default 08-14-2008, 07:30 PM

Quote:
Originally Posted by lenwhistler View Post
  • You are missing all the $edad = $_POST['edad'];. You need about 10 of those.
  • The date is working because it is on line 5.



----------------
wow... it really works! thanks man.
Reply With Quote
Reply


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

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



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com