zero-perfoliate
zero-perfoliate

Author Topic: I am so friggin lost... help with echo command  (Read 4226 times)

Archmaille

  • Guest
I am so friggin lost... help with echo command
« on: January 25, 2008, 01:54:16 AM »
Ok, so far as I know I'm doing this correctly... but that shows how far I know.  I'm working on coding a website from the ground up... it's more of a crash course in "hey learn PHP on your own" for myself than anything.  I've worked with PHP-Nuke and WordPress for years now, and done minor adjustments to the sites so my knowledge is growing but obviously still limited.  If you could help me and also please tell me why mine isn't working so that I can learn.  Don't be afraid to respond as if I am a small stupid child, my feelings won't be hurt :-P

Code: [Select]
echo "<form id=\"submit\" action=\"editprofile.php5\" method=\"POST\" name=\"submit\">
<center>
<p>Display Name</p>
<p><input type=\"text\" name=\"dname\" value=\"\" size=\"45\" maxlength=\"50\" /></p>
<p>My picture</p>
<p><input type=\"file\" name=\"image\" /> <br /><small>Image must be .jpg format and contain no spaces or other invalid characters.</small></p>
<p>About Me</p>
<p><textarea name=\"pro-sum\" rows=\"20\" cols=\"75\">{$row['summary']}</textarea></p>
<p>Hobby's</p>
<p><input type=\"text\" name=\"hobby\" value=\"\" size=\"75\" maxlength=\"100\" /></p>
<p><div align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Update my profile!\" /></div></p>
</center>
</form>";

That's what I have... it displays as completely blank though.  It worked before I put it in the PHP but I wanted to display the data already in the database after people edit their profile so they know what is there without looking at the displayed page to know.  As far as I can tell it should be correct, I mean all the quotation marks are escaped, no broken code... just doesn't print on the page.

icestormz

  • Guest
Re: I am so friggin lost... help with echo command
« Reply #1 on: July 02, 2008, 03:00:03 PM »
Yes your code is correct and should display properly make sure that code is within a php block other wise it will not work and also make sure that the file is a .php extension.

<?php

My echo code goes here

?>

Offline kam11

  • New PHP Members
  • Posts: 2
  • Karma: +0/-0
Re: I am so friggin lost... help with echo command
« Reply #2 on: February 08, 2009, 03:18:58 AM »
myself than anything.  I've worked with PHP-Nuke and WordPress for years now, and done minor adjustments to the sites so my knowledge is growing but obviously still limited.  If you could help me and also please tell me why mine isn't working so that I can learn.  Don't be afraid to respond as if I am a small stupid child.

hotnoob

  • Guest
Re: I am so friggin lost... help with echo command
« Reply #3 on: December 06, 2009, 11:28:23 AM »
Ok, so far as I know I'm doing this correctly... but that shows how far I know.  I'm working on coding a website from the ground up... it's more of a crash course in "hey learn PHP on your own" for myself than anything.  I've worked with PHP-Nuke and WordPress for years now, and done minor adjustments to the sites so my knowledge is growing but obviously still limited.  If you could help me and also please tell me why mine isn't working so that I can learn.  Don't be afraid to respond as if I am a small stupid child, my feelings won't be hurt :-P

Code: [Select]
echo "<form id=\"submit\" action=\"editprofile.php5\" method=\"POST\" name=\"submit\">
<center>
<p>Display Name</p>
<p><input type=\"text\" name=\"dname\" value=\"\" size=\"45\" maxlength=\"50\" /></p>
<p>My picture</p>
<p><input type=\"file\" name=\"image\" /> <br /><small>Image must be .jpg format and contain no spaces or other invalid characters.</small></p>
<p>About Me</p>
<p><textarea name=\"pro-sum\" rows=\"20\" cols=\"75\">{$row['summary']}</textarea></p>
<p>Hobby's</p>
<p><input type=\"text\" name=\"hobby\" value=\"\" size=\"75\" maxlength=\"100\" /></p>
<p><div align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Update my profile!\" /></div></p>
</center>
</form>";

That's what I have... it displays as completely blank though.  It worked before I put it in the PHP but I wanted to display the data already in the database after people edit their profile so they know what is there without looking at the displayed page to know.  As far as I can tell it should be correct, I mean all the quotation marks are escaped, no broken code... just doesn't print on the page.
in your code, add before that segment, ini_set('display_errors', '1');

 

zero-perfoliate