Need PHP Help

Miscellaneous Forums/General Help/Need PHP Help

Hi everyone,

I've started learning a little PHP since its so similar to C. I started to implement it on some websites but I just can't get it to work:
echo "<form method='post' action='contact.php'>";
  //echo "<p class="wrap">Email:</p>";
  echo "<input name='email' type='text' /><br />";
  //echo '<p class="wrap">' . Message: . '</p>';
  echo "<br /><textarea name='message' rows='15' cols='40'>
    </textarea><br />
    <input type='submit' />
    </form>";


Its a simple email submit form. This (and the rest of the code) works, and it even sends emails. The problem I'm having is I can't get the style tags to work for 'Email' and 'Message'. I have them commented out so it will work, but uncommenting them gives me a blank web page.

I looked at a website that had something on it about style tags in echo, and tried all different arrangements of quotes, but I'm stumped on this one. I'm sure its an easy solution too ;)

Any help is greatly appreciated, thanks a ton,

What is Message:? Why is it outside of the echo quotes?

If it is a variable, it needs to be $Message.

Also, it is better to single quote your echos, that way you can have double quotes in your output easier.

echo '<form name="myform" action="action.php">';

What does the CSS of your wrap class look like? maybe there is a mistake there as well?

Try:
echo "<p class='wrap'>Email:</p>";
and
echo "<p class='wrap'>Message:</p>";

If that doesn't work, your CSS might be stuffed.

//echo "<p class="wrap">Email:</p>";
Your ending the string at "wrap and starting another one... try using single quotes:

//echo '<p class="wrap">Email:</p>';

Hey thanks guys, it was just the single/double quote thing. This website I'm working on is much better with a just a tad of PHP added, but I'm still learning :)

Thanks again,