Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

<<

 
   Database Forums (Home) -> PHP RSS
Next:  What Is Wrong With This query?  
Author Message
Cruella DeVille

External


Since: Feb 28, 2006
Posts: 2



(Msg. 1) Posted: Thu Mar 09, 2006 11:20 am
Post subject: <<
Archived from groups: alt>php (more info?)

Let us say I have lots of html-code I want to print.... surrounded by
php code. I learned once that I could do like this:

<?php
$name = empty($_POST['name'] ? "" : $_POST['name'];

print
<<<HTML
<form method="post" action="">
Name: <input type="text" name="name" value="{$name}">
<input type="submit" name="submit" value="Press me">
</form>
HTML;

//and the rest of my php code.

Now my server is complaining about this. Is this wrong syntax? I've
tried to replace <<<HTML HTML; with <<<END END; but it doesn't make a
difference. Is it a special "code" word I've missed or is it
indifferend wethere I use <<<HTML or <<<END?

 >> Stay informed about: HTML 
Back to top
Login to vote
Janwillem Borleffs1

External


Since: Sep 17, 2003
Posts: 170



(Msg. 2) Posted: Thu Mar 09, 2006 3:55 pm
Post subject: Re: << [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Cruella DeVille wrote:
> $name = empty($_POST['name'] ? "" : $_POST['name'];
>

$name = empty($_POST['name']) ? "" : $_POST['name'];
---------------------------------^


JW

 >> Stay informed about: HTML 
Back to top
Login to vote
Surfer!

External


Since: Dec 31, 2005
Posts: 7



(Msg. 3) Posted: Thu Mar 09, 2006 6:55 pm
Post subject: Re: << [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In message , Janwillem
Borleffs writes
>Cruella DeVille wrote:
>> $name = empty($_POST['name'] ? "" : $_POST['name'];
>>
>
>$name = empty($_POST['name']) ? "" : $_POST['name'];
>---------------------------------^
>
I had to paste this into Notepad to see what is going on! There is a
missing ')' just before the '?'.

--
Surfer!
Email to: ramwater at uk2 dot net
 >> Stay informed about: HTML 
Back to top
Login to vote
Janwillem Borleffs

External


Since: Jul 06, 2004
Posts: 22



(Msg. 4) Posted: Fri Mar 10, 2006 5:55 am
Post subject: Re: << [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Surfer! wrote:
> I had to paste this into Notepad to see what is going on! There is a
> missing ')' just before the '?'.
>

Correct.


JW
 >> Stay informed about: HTML 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
PHP/HTML - Hope there is someone out there how can help me. I got a small problem, as you will properly see i'm a newbi. I'm running php 5.1.2 and apacheserver 2.0.55 on a winxp installation. The following code is not displaying anything in the browser: <?php...

PHP in html - Hello, I have a php include command in my website and the script shows up. However, I need for the script to show up on the right side of page (there is enough room there)... but for some reason it shows up at the bottom. I placed the include command...

HTML email using PHP - Hello How do i send a HTML email using PHP. I have tried loads of examples and they are not working. last example was <?php $to = blabla@bla.net; $subject = 'Wakeup bob!'; $message = '<b>yo</b>, whassup?'; $headers = "From:..

HTML Mail - How may I setup a proper HTML mail message with embedded href links using PHP, that follows all the MIME rules? Any examples or links would be appreciated. Thanks!

php & html editor - Hi there, I'm starting to learn php and need a php editor for windows. Can you recommend what you think the best editor available in the market? I've tried some free html editors and was not satisfied with them. I need one that is simple and neat...
   Database Forums (Home) -> PHP All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]