Pages: [1]   Go Down
Author Topic: I am so friggin lost... help with echo command  (Read 2794 times)
Archmaille
Guest
« on: January 24, 2008, 05:54:16 PM »

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:
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.
Report to moderator   Logged

icestormz
Guest
« Reply #1 on: July 02, 2008, 06:00:03 AM »

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

?>
Report to moderator   Logged

kam11
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


« Reply #2 on: February 07, 2009, 07:18:58 PM »

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.
Report to moderator   Logged


hotnoob
PhpBar.isgreat.org
Hero Member
*****

Karma: +0/-0
Offline Offline

Posts: 113


WWW
« Reply #3 on: December 06, 2009, 03: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:
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');
Report to moderator   Logged

http://phpbar.isgreat.org
Feel free to check out my forums for more tutorials and help Cheesy

Pages: [1]   Go Up
Print
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC | Theme Kani By Fussilet

Page created in 0.036 seconds with 19 queries.