1

Could someone tell me what fails in the following line:

echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href='login_app.php'>Log In</a></label></div></div>';

I know it must be a tiny stupid error, but I don't get it.

Thank you for your time

alberzyzz
  • 277
  • 2
  • 15
  • Well, the screen shows nothing (white page) when the php page is loaded – alberzyzz Jul 19 '16 at 11:30
  • See [this reference answer on how to find your error message](http://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php/12772851#12772851). Also note that the code formatting here, and any decent editor, gives a big clue about where in the string the problem is. – IMSoP Jul 19 '16 at 11:35
  • I am using Sublime Text 2. Which one do you recommend me? – alberzyzz Jul 19 '16 at 11:36

4 Answers4

1

You are mixing single quotes and double quotes. href='login_app.php' change to href="login_app.php"

Try this,

  echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href="login_app.php">Log In</a></label></div></div>';
Vinod VT
  • 6,946
  • 11
  • 51
  • 75
1

Replace your code with this code, its just mistake of single quote**(')** and double quote**(")**

echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href="login_app.php">Log In</a></label></div></div>';
Devsi Odedra
  • 5,244
  • 1
  • 23
  • 37
1

Try This:

<?php
echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href="login_app.php">Log In</a></label></div></div>';

?>
1

You are mixing double quote with single quote, use below:-

 echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href="login_app.php">Log In</a></label></div></div>';

You can use your current script with the php variable like below:-

$login_url='login_app.php';

echo '<div id="login"><div id="centrar_app"><label>Success. Created account. <a href='.$login_url.'>Log In</a></label></div></div>';
Deepak Dholiyan
  • 1,774
  • 1
  • 20
  • 35