Jump to content

echoing form if not sent


droidus

Recommended Posts

i have a form, and if the form has not been sent, it shows the form.  here is  my code for the beginning:

 

if($sent != true) { 
echo"
?>

<div class='form'><form action='' method='post'> [b]!!![/b]
<p class='form'>User ID: <br /><input name='memberID' type='hidden' value='<?php echo $row['id'] ?>' />
  Your User ID will be logged for identity purposes. 
    <br /><input type='checkbox' name='noIdentity' id='noIdentity' value='noIdentity'
    <?php 
if(isset($_POST['errors']) && isset($_POST[noIdentity])) { [b]!!![/b]
	echo ' checked='checked '"; 
} 
?>
     />

 

and the end:

 

<?php 
	";
}
	?>

 

it doesn't like what i have the exclamations next to.  also, am i doing this right?

Link to comment
Share on other sites

and what exactly does "it doesn't like" meen?

perhaps missing some single quotes here?

isset($_POST[noIdentity][.php]
[/quote][quote author=droidus link=topic=342474.msg1615651#msg1615651 date=1314366077]
it still doesn't like the line, [code]<p class='form'>User ID: <br /><input name='memberID' type='hidden' value='<?php echo $row['id'] ?>' />

 

and i am trying to close the entire echo statement.

<?php echo $row['id']; ?>

 

what do you mean "it doesnt like the line?" what error do you get?

:facewall: :facewall:

Link to comment
Share on other sites

ok, but wouldn't the value "'" get confused with the row id "'"?

value='<?php echo $row['id']; ?>'

 

also, it still doesn't like that row.  it gives off an error saying "unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING"

Link to comment
Share on other sites

ok, so here were some of the fixes:

 

i guess if you use echo "$row['name']"; you can't use the single quotes.  so i took those out, and it was happy. although now when i do value='<?php if(isset($errors)) { echo $_POST[otherEmail]; } ?>' i get in the text box, this php code.  so i just put in $_POST[otherEmail].

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.