Re: [PHP] php parses but no data inserted

2004-09-21 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote:
hi there,
the following code runs but no message is displayed from the if then else
statement at the end of the script. also, nothing is written to the database.
i have checked the insert statement and the login credentials are correct.does
anyone know what might be causing this?

// if the submit buttons has been pressed
if (isset($_POST['submit'])){
Is the submit button name/value pair being posted?
Add else clause to the condition and echo something.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php parses but no data inserted

2004-09-21 Thread John Nichel
[EMAIL PROTECTED] wrote:
hi there,
the following code runs but no message is displayed from the if then else
statement at the end of the script. also, nothing is written to the database.
i have checked the insert statement and the login credentials are correct.does
anyone know what might be causing this?
thanks,
lukemack.
?php
/*
TITLE: Inmarsat Form handling script
AUTHOR: Luke Mackenzie
DATE: 18/09/04
*/
error_reporting(E_ALL);
// if the submit buttons has been pressed
if (isset($_POST['submit'])){
snip
Do you have a form element named 'submit' on the page that submits to 
this script?  Right after the if statement you can echo something out 
just to see if it's working

if (isset($_POST['submit'])){
echo ( It worked );
If you don't see the output, then your if statement is returning false.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php parses but no data inserted

2004-09-21 Thread Jason Wong
On Tuesday 21 September 2004 21:37, [EMAIL PROTECTED] wrote:

 error_reporting(E_ALL);
  ini_set('display_errors', 1);

for good measure.

 @mysql_select_db(inmarsat_comp) or die (Could not select Database);

Lose the '@' whilst developing and always use mysql_error().

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Go climb a gravity well!
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php