heirani1 Posted June 18, 2008 Share Posted June 18, 2008 im new to php so please bare with me, im working on this sign up script and a message is echoed in the php, i want to echo the message in the html so i can move and position the text easier. hope you can help, heres the code ... <?php include('config.php'); // table name $tbl_name=temp_members_db; // Random confirmation code $confirm_code=md5(uniqid(rand())); // values sent from form $name=$_POST['name']; $email=$_POST['email']; $password=$_POST['password']; $country=$_POST['country']; // Insert data into database $sql="INSERT INTO $tbl_name(confirm_code, name, email, password, country)VALUES('$confirm_code', '$name', '$email', '$password', '$country')"; $result=mysql_query($sql); // if suceesfully inserted data into database, send confirmation link to email if($result){ // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to=$email; // Your subject $subject="Your confirmation link here"; // From $header="from: [email protected]"; // Your message $message="Your Comfirmation link \r\n"; $message.="Click on this link to activate your account \r\n"; $message.="http://localhost/Test/log/confirmation.php?passkey=$confirm_code"; // send email $sentmail = mail($to,$subject,$message,$header); } // if not found else { echo "Not found your email in our database"; } // if your email succesfully sent if($sentmail){ echo "Your Confirmation link Has Been Sent To Your Email Address.<br> You will now be directed back to the login page. <META HTTP-EQUIV=\"refresh\" content=\"2; URL=index.php\">"; } else { echo "Cannot send Confirmation link to your e-mail address"; } ?> Link to comment https://forums.phpfreaks.com/topic/110809-php-echo/ Share on other sites More sharing options...
Jabop Posted June 18, 2008 Share Posted June 18, 2008 <html> <head> </head> <body> <span style="font-weight:bold;"><?=$YourVariable?></span> </body> </html> Link to comment https://forums.phpfreaks.com/topic/110809-php-echo/#findComment-568591 Share on other sites More sharing options...
mnielsen Posted June 18, 2008 Share Posted June 18, 2008 use the print function for each tag, e.g. print "<div class=\"text\"></div>". The advantage of this function is its use to output more complicated actions and messages apposed to echo which is generally used to out put a single line of text. Link to comment https://forums.phpfreaks.com/topic/110809-php-echo/#findComment-568620 Share on other sites More sharing options...
Barand Posted June 19, 2008 Share Posted June 19, 2008 use the print function for each tag, e.g. print "<div class=\"text\"></div>". The advantage of this function is its use to output more complicated actions and messages apposed to echo which is generally used to out put a single line of text. My bullshit monitor just went off the scale Link to comment https://forums.phpfreaks.com/topic/110809-php-echo/#findComment-568644 Share on other sites More sharing options...
.josh Posted June 19, 2008 Share Posted June 19, 2008 My bullshit monitor just went off the scale QFT Link to comment https://forums.phpfreaks.com/topic/110809-php-echo/#findComment-569078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.