Current location: Hot Scripts Forums » Programming Languages » PHP » parse error help


parse error help

Reply
  #1 (permalink)  
Old 04-21-04, 04:20 PM
fraggle fraggle is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
parse error help

I have been pulling my hair out here trying to see where i am going wrong, so to stop a young(ish) man going bald please take a look and advise why I am getting a parse error on the line containing <?php if (isset($....etc

<b>Username:</b> <input type="text" size="20" maxlength="20" name="username"
<?php if (isset($_POST['username'])) ?> value="<?php echo $_POST['username']; ?>" <?php } ?>/><br />
<b>Password:</b> <input type="password" size="20" maxlength="10" name="password" /><br />

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-21-04, 04:32 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
this code is pretty messed up

you didn't opent the code block with a brace !

PHP Code:

?>

<b>Username:</b>
<input type="text" size="20" maxlength="20" Name="username" 
<?php
if (isset($_POST['username'])) {
?>
value="<?php echo $_POST['username']; ?>"
<?php 
}
?>
/><br />
if the error is still there, tell us what is the message appearing !
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 04-21-04, 04:33 PM
Bonzo's Avatar
Bonzo Bonzo is offline
Coding Addict
 
Join Date: Jan 2004
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
I am new to this but i would try replacing the line :
PHP Code:

<?php if (isset($_POST['username'])) ?> value="<?php echo $_POST['username']; ?><?php ?>/><br />
with
PHP Code:

<?php

if (isset($_POST['username']))
{ echo 
" value="$_POST['username'], " /><br />" ; }
Basicly it looks like you are missing your opening bracket {

Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 04-21-04, 04:49 PM
fraggle fraggle is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Sorted - Thanks
I have been looking at it tooooo long

.........and on we go>>>>>>>>>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse title redspider ASP 2 04-14-04 07:57 AM
parse error Abdul PHP 2 03-15-04 06:49 AM
[php error] parse error | fatal error xeoHosting PHP 1 01-03-04 09:12 PM
PHP script to parse HTML Skeleton Man Script Requests 2 10-05-03 09:41 PM
PARSE Question clintre PHP 2 09-02-03 01:30 PM


All times are GMT -5. The time now is 08:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.