Forum Moderators: coopster

Message Too Old, No Replies

Some more variable help

         

BahamutG

10:02 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



In a blog script I have Im having some trouble.
Heres a little snippet:
<pre>
<td><input type="hidden" name="dbdate" value="<?php echo $dbdate;?>">
<input type="submit" name="submit" value="Add Blog!">
</form>
</td>
</tr>
<tr>
<td>
<?php
if ($submit) {
</pre>
I get an undefined variable error for submit. That is the only place on all the pages it has the variable, so I know I don't have to get it from outside thing. I'm pretty sure its talking about the form up above. If any of you can help me and tell me how I can fix it, it would be appreciated. I know this is a not good explenation, but I don't know how else to say it.

BahamutG

10:03 pm on Feb 14, 2004 (gmt 0)

10+ Year Member



never mind the <pre></pre>

justageek

10:08 pm on Feb 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does it happen the first time the page is loaded? If so then use if(isset($HTTP_POST_VARS['submit'])).

OR

Your globals are off. Try if($HTTP_POST_VARS['submit']).

JAG