GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Jun-2003, 05:13
norok norok is offline
New Member
 
Join Date: Jun 2003
Posts: 23
norok is an unknown quantity at this point

Problem with php/mysql script during runtime


Following message is shown
beside the html dokument:
Input new title for the mylibrary database

Notice: Undefined variable: formSubmit1 in d:\programme\apache group\apache\htdocs\bibli\input.php on line 707

Notice: Undefined variable: formSubmit2 in d:\programme\apache group\apache\htdocs\bibli\input.php on line 727

Input new title (stage 1)
Title: *
Subtitle:
Edition:
Authors: *
Publisher:
Category:
Notice: Undefined variable: formCategory in d:\programme\apache group\apache\htdocs\bibli\input.php on line 770
(choose)All books Children's books Computer books Databases MySQL Object-oriented databases Relational Databases SQL LaTeX, TeX Programming Perl PHP Literature and fiction
Publishing year:
Language:
Notice: Undefined variable: formLanguage in d:\programme\apache group\apache\htdocs\bibli\input.php on line 777
(choose)deutschenglishnorsksvensk
ISBN:
Comment/Keywords:


No idea what to do in order to fix this, happens with other scripts to.

Would be great if somebody could help,

matthias
  #2  
Old 24-Jun-2003, 06:20
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
your error_reporting is set to E_ALL, leave it like that :)

to fix you problem use
PHP Code:

$formSubmit1 = (isset($formSubmit1)) ? $formSubmit1 : ''; 



and repeat it for the other strings...

that should fix some things, if you supply a bit code we can look and fix everything

if you want to become a good PHP coder you should always put error_reporting(E_ALL); in your scripts, and fix all errors you see
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 24-Jun-2003, 06:42
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

PHP error_reporting() settings


Hello Matthias,

This is a common problem with every PHP script that I write.

Like Allowee has already said, it's your error_reporting default value set in the php.ini file.

The good news is that you can overwrite this setting - this is good news ONLY if you didn't write the script yourself, you don't know PHP well enough to go fixing everything AND you want a quick fix.

Go to the top of this script and just add this line:
PHP Code:

error_reporting (E_ALL ^ E_NOTICE); 



But like Allowee also mentioned, it is recommended that you fix the 'real' problems instead. Here's an example why:

PHP Code:

<?php
$test = 'something';
if( $test ):
    echo $text;
endif;
?>


This piece of script will send out the same kind of error notice like what you described. Notice the spelling error for the variable; $text instead of $test!

If you understand the snippet of code above, you'll realise why most PHP coders prefer to develop their PHP codes with error_reporting() set to E_ALL.
  #4  
Old 25-Jun-2003, 05:35
norok norok is offline
New Member
 
Join Date: Jun 2003
Posts: 23
norok is an unknown quantity at this point

Thank you, i got it fixed


Hallo Guys,
it was exactly what you assumed.

Thanx
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect multiple URLs to one script, masking true URL Maccaday Apache Web Server Forum 1 10-Dec-2003 08:34
JavaScript Tutorial Part 1 pcxgamer Web Design Forum 2 01-Dec-2003 09:16
problem with php5 cgi installation fab13 Apache Web Server Forum 3 19-Nov-2003 09:11
Why does javascript cause sound problem to website rhino1616 Web Design Forum 8 06-May-2003 16:25
A very good sitemap script jrobbio MySQL / PHP Forum 3 03-Mar-2003 01:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:04.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.