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
https://forums.phpfreaks.com/topic/245757-echoing-form-if-not-sent/
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:

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].

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.