![]() |
|
#1
|
|||
|
|||
Undefined variable: message view details....Hi, This is what I am getting when submitting the details.
Notice: Undefined variable: message in /home/ca5iog/public_html/view-student-details.php on line 57 PHP Code:
thanks for the help Ian Last edited by LuciWiz : 20-Aug-2008 at 05:30.
Reason: Please insert your Php code between [php] & [/php] tags
|
|||
|
#2
|
|||
|
|||
Re: undefined variable: message view details....The error as you posted places $message as suspect... not defined? hmmm...well where is that supposed to be done?
I look at the declaration and then trace down to where it is given another value which looks questionable. So I whip out the cli to test the line: Code:
The cli is pretty handy. You can also run a script on the command line. 'man php' for info... One other thing. You can use javascript to verfy user input before a form is submitted: w3schools.com/js/js_form_validation.asp Last edited by Howard_L : 19-Aug-2008 at 23:10.
|
|
#3
|
|||
|
|||
Re: undefined variable: message view details....hi Howard,
thanks for your hint. I have loooked over at what you saod and have changed it. But I am still getting line 57 Notice: Undefined variable: message in /home/ca5iog/public_html/view-student-details.php on line 57 and now line 65 Notice: Undefined index: userID in /home/ca5iog/public_html/view-student-details.php on line 65 I am still having the same trouble with line 57 even after the change and now line 65.... Can you have a look and see where I am going wrong.... Thanks for the help Ian here is the code PHP Code:
Last edited by LuciWiz : 20-Aug-2008 at 05:31.
Reason: Please insert your Php code between [php] & [/php] tags
|
|
#4
|
|||
|
|||
Re: undefined variable: message view details....Hi Howard,
You can look at my website at osiris.sunderland.ac.uk/~ca5iog/view-student-details.php Ian Quote:
|
|
#5
|
|||
|
|||
Re: undefined variable: message view details....Disclaimer: first I must state that I am new to .php , But I'll try to help.
Ok so the problem occurs at the initial loading of the 'view-student-details.php' : Notice: Undefined variable: message in /home/ca5iog/public_html/view-student-details.php on line 57 I note that in last post above line 57 is this: if($message) { echo "<p>". $message ."</p>"; // *** and this is at line 58 Anyhow, so follow the logic trail of $messsage. Start at the top of the source: view-student-details.php and follow it from there. PHP Code:
I don't think you will have any '_POST' values at the first load, so both the first and second would not be true so nothing would be assigned to $message, not even NULL... You can test whether any of those tests are true by simply placing an echo statement in there. You could also try to print $message anywhere and compare to what you would 'expect' it to be : PHP Code:
btw, I like the simplicity of your page... Nice quick load! ...gotta go.... |
|
#6
|
||||
|
||||
Re: undefined variable: message view details....Quote:
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fl_PNG_Image undefined reference | Invincible | FLTK Forum | 8 | 22-Aug-2009 14:57 |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| gnu.linkonce undefined reference | newbie06 | C++ Forum | 4 | 13-Mar-2007 10:53 |
| Help! Some basal questions about MFC | xutingnjupt | MS Visual C++ / MFC Forum | 1 | 05-Dec-2004 04:38 |
| Undefined variable | skyloon | MySQL / PHP Forum | 2 | 22-Aug-2004 09:58 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The