Page 1 of 1

$_SESSION[''] if statement is printing error [SOLVED]

Posted: Sun Jul 16, 2006 10:34 am
by tecktalkcm0391
I have a page that includes page1.php:

Page1.php
I have this on the included page: (Just put it all together)

Code: Select all

 <input name="username" type="text" id="username" value="

Code: Select all

<?php if(!isset($_POST['reset']) || isset($_SESSION['username'])){   print($_SESSION['username']);  } ?>

Code: Select all

" size="28" maxlength="25" />
And I keep getting this in the textbox:
<br /><b>Notice</b>: Undefined index: username in <b>/home/public_html/register/page1.php</b> on line <b>21</b><br />

Posted: Sun Jul 16, 2006 10:38 am
by Jenk
use && instead of ||

Posted: Sun Jul 16, 2006 10:43 am
by tecktalkcm0391
haha. I feel so stupid now. I don't know why i did that. :oops: