Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-27-2003, 09:31 AM   #1
Member (3 bit)
 
Join Date: Jun 2003
Posts: 4
Question n00b PHP question

i'm learning to write PHP just by a simple web tutorial. so i write a simple code that should just print "I am the CHICKEN MAN" on the screen, right? well i'm seeing nothing. :-( i dunno if i have to have some special things installed on my comp or what. i have PHP 4.3 installed, so i dunno what i'm missing. i know HTML and c++ and java and vb, so this should be basic stuff.

here's a quick copy of the code (with the HTML tags slightly changed so they'd appear), just in case something is wrong in there.
html>
body>
(<)?php
print ("I am the CHICKEN MAN");
?>
/body>
/html>

course add < in front of HTML tage and i put the < in parenthesis for the php tag.

help? please? anyone?

Last edited by DarkSeraph; 06-27-2003 at 09:51 AM.
DarkSeraph is offline   Reply With Quote
Old 06-27-2003, 02:15 PM   #2
Member (8 bit)
 
Join Date: Jun 2003
Posts: 153
Instead of print, try echo.

Also, I'm not sure but I think you might need to install the Apache web server as well.

PHP Code:
<html>
<title>I am the chicken man</title>
<?php

     
echo ( "I am the chicken man" );

?>
</html>
Sanke is offline   Reply With Quote
Old 06-27-2003, 03:22 PM   #3
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Print and echo do the same thing. A couple of things come to mind as to why you would have this problem. One is to determine if php is actually getting parsed. Try this:
PHP Code:
<?php 
phpinfo
();
?>
or even this:

PHP Code:
<?php 
echo "I am the chicken man"
?>
which will give you a parse error.
Save it as php.php and then see if it gives you any info. This will basically give you everything that you wanted to know about php. If nothing displays then you do need to make sure that you are running a webserver like Apache.
mairving is offline   Reply With Quote
Old 06-27-2003, 04:35 PM   #4
Member (3 bit)
 
Join Date: Jun 2003
Posts: 4
hmm. well thanx for the help guys, but i am still getting it blank. i THOUGHT i installed apache web server, but maybe i got something wrong, the exact directions i followed are here
http://hotwired.lycos.com/webmonkey/...tw=programming
steps 8-10. so if you can help guide me the right way, that would be awesome. :-) thanx
DarkSeraph is offline   Reply With Quote
Old 06-27-2003, 04:44 PM   #5
Member (8 bit)
 
Join Date: Jun 2003
Posts: 153
Type: http://localhost (no dot extension) into your browser, if it doesn't work, then Apache hasn't been installed correctly.
Sanke is offline   Reply With Quote
Old 06-27-2003, 05:13 PM   #6
Member (3 bit)
 
Join Date: Jun 2003
Posts: 4
that would be my problem, apache HAS been installed properly, the link does work. but still i get nothing on pages i wrote.

btw, i am doing the cheaters way of using Dreamweaver MX to make things easy, but i still need to know how to code php.

Last edited by DarkSeraph; 06-27-2003 at 05:18 PM.
DarkSeraph is offline   Reply With Quote
Old 06-27-2003, 06:42 PM   #7
Member (11 bit)
 
Doobie's Avatar
 
Join Date: Jul 2002
Location: Mexico
Posts: 1,049
Send a message via AIM to Doobie Send a message via Yahoo to Doobie
Try it with this tutorial

http://internetmaster.com/installtutorial/

This is the one I used when I installed Apache and PHP...
Its very easy to follow... Check over it you might find a step that the other tutorial didnt have...
__________________
Computer: 486
Ram: 8 MB
CD Rom: None
OS: Windows 3.1
Doobie is offline   Reply With Quote
Old 06-27-2003, 08:12 PM   #8
Member (3 bit)
 
Join Date: Jun 2003
Posts: 4
WOOHOOO!!!! you kick ass. thank you a ton!!!
DarkSeraph is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:02 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2