Need PHP Help
Community 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, |
| ||
Hey, this isn't really PHP related but I have a quick question and didn't want to spend a whole post on it... If I have .wma music files embedded in my website, will Mac/Linux users be able to play them? Also, after downloading, would they be able to play them on their computers? Thanks, |
| ||
wish I could answer that but i'm not sure if they support .wma files in their native players, however many cross-platform players that a good portion of, at least mac users have (quicktime amongst many), should have support for .wma files. |
| ||
I would imagine they would support it... its a site for a music group and a lot of Mac people are musicy people so I want it to work for all. |
| ||
It can also be done like this:echo "<p class=\"wrap\">Email:</p>"; Now I'm not into C, but I believe that worked in C in the same manner. |