Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   Video Tutorials (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=180)
-   -   echo problem (http://www.dreamweaverclub.com/forum//showthread.php?t=27505)

moe122 03-02-2008 04:45 PM

echo problem
hi david,

you know when you have the echo thing in php it shows a message at the top of the window, how can i put it wherever i want?

davidj 03-02-2008 07:55 PM

assign the string to a variable then place the variable and echo it where you want it in the page

PHP Code:

<?php echo $variable?>

moe122 03-02-2008 08:07 PM

bt its as an else if statement so elseif echo......

moe122 03-02-2008 08:11 PM

ok i've changed the elseif 2 <?PHP if($submitted){
echo $error;
}?> and put it where i want so its within the html coding..........that ent going to cause me ne problems is it?

davidj 03-02-2008 08:20 PM

its best to try and keep your logic seperate

above the HTML tag (inside the php)

PHP Code:

$error "error1 text";
$error "error2 text";

inside the html

PHP Code:

<?php echo $error?>

moe122 03-02-2008 08:32 PM

yh i did something similar but had the else if as jus if and put that with the html bt ur method seems logical so ive changed it now. cheers

All times are GMT. The time now is 01:42 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com