[Site Home] [Forum Home] [Articles] [File DB] [News Archives]

IceTeks Articles -> Php how-to for starters


(View original topic)


Guest - Mar-18-2006 server time
Very interesting and beautiful site. It is a lot of helpful information. Thanks!

Cesar - Jan-20-2006 server time
Hello.
I am new at this, and I need to build a web page. I will use for sure PHP and MySQL. However, I am new at all this stuff, so I would really be thankfull if you could give me your oppinion on the following:
1) Is Apache the best solution to perform with PHP and MySQL?
2) I am not a programmer, so I have a lot to run... I have never worked with Linux, but for what I have read, it seams that using this applications with Linux is better than with Windows. What do you say on this?
3) I would like to have a forum (chat) and kind of a blog (comments to published notices). What would you advise me for each?? (At this point I realy don't know much even where to start, or what does it implies to administrate each one...)

thank you very much


viraj - Oct-25-2005 server time
hello
i have recently installed PHP designer 2005.
can u guide me for how to run php code in designer

halojoy - Jun-09-2005 server time
Yes, it is nice with scripts that does note produce notices.
isset is a good way to avoid this,
if you do not want to add a lot of code that sets 'empty' values for variables

Another way is to TURN OFF reporting of NOTICE
you add this, at top (beginning) of your php pages:
CODE
<?php

// Report ALL, but not NOTICE
error_reporting ( E_ALL & ~E_NOTICE );

// You will still get WARNINGS and other real ERRORS
// Notice is not an error, just a note
// To not have to add it in all your pages you can make it a line in 'config.php' ,
//  if you have such a file, that is included by php pages
?>
I use E_ALL = reporting with notices only when working with my code
When I am finished and put my code on website, I Turn Notice OFF, using that line.
I do not want to scare my visitors laugh.gif

Terry - Jun-09-2005 server time
Your article has been very useful. When I implemented your example it functioned as described with the exception that a number of notices were generated. All of the notices were complaining about undefined constants. After some digging around and experimentation I found that the notices could be eliminated by the use of isset and by quoting names in the $_GET and $_POST functions. For what it is worth the following is a rewrite of the example which, at least in my environment, eliminated all of the notices:
NOTE: The leading underscore characters, "_", at the start of some lines represent spaces and/or tabs.

<?php
____if(isset($_GET["act"]) && $_GET["act"]=="go")
____{
________echo("Your name is ".$_POST["name"].
____________" And your age is ".$_POST["age"].
____________"<br>Goodbye");
____}
____else
____{
?>

<form method="post" action="script.php?act=go">
____Enter your name: <input type="text" name="name"><br>
____Enter your age: <input type="text" name="age"><br>
____<input type="submit" value="done!">
</form>

<?php
____Return;
____}
?>

Tov - Mar-11-2005 server time
Well Written- better than most I've seen
I run some phpbb and some php blogs and some magpie tweaks
I'm gearing up to rewriting a site from scratch in php
perhaps in 2007. Thanks 4 your help.
www.phenomi.net

Red Squirrel - Nov-16-2004 server time
You need to run it off a webserver that has php installed.

So you would type http://serverhost/script.php


rahul - Nov-16-2004 server time
I am newbee for php.
I don't know..how to run php script.I saved my first script first.php in /home/rahul/.then opened mozilla and written /home/rahul/first.php .but when I pressed enter I got blank screen.When I treid to view source I am able to see my script.
I don't know what is the problem.
I will be thankfull if You solve my queries.
with regards
Rahul

Red Squirrel - Oct-13-2004 server time
It means you have a syntax error in your mysql query, unfortunatly mysql is not very helpful at telling WHAT the error is, so you'll have to figure that part out. Post the query and maybe I can look at it and find the problem.

jewboy419 - Oct-13-2004 server time
pressanykey.gif i am doing a php on euoropean lycos and i get an error when using this code: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near" the first line of the code... can' anyone help!!!

sintekk - Oct-08-2004 server time
QUOTE (Red Squirrel @ Jul 6 2004, 08:41 PM)
Tripod actually has php amd mysql? That's cool, I did not know that.

Only the European lycos, the US one still believes that everybody that wants a website with them just wants to make a Hillary Duff fan page laugh.gif

...now only if there was a free ColdFusion host out there sad.gif...

Red Squirrel - Oct-08-2004 server time
The code is functional, it's been tested. Did you maybe miss a semi colon or something? Newer versions of php just give out a blank page instead of a parse error, unless changed in the settings.

Sam Spade - Oct-07-2004 server time
I tried the code example for using forms with php and it doesn't work. I get a blank page. What's the deal?

Red Squirrel - Jul-06-2004 server time
Tripod actually has php amd mysql? That's cool, I did not know that.

Very good free PHP/MySQL hosting - Jul-06-2004 server time
Here I have installed PHP Nuke and it works great

Lycos Tripod

rogue - Jun-23-2004 server time
all you need to run php is a good host, a good forum board i suggest vbulletin if you want to pay for it or phpbb if not both are good tho both have good and bad points then you need some good admins who know how to work with the code so you can make it your style but you also need some good members as well no good making a board if no-one wants to stay and chat dancingbanada.gif

Red Squirrel - Jun-20-2004 server time
php installs on the server and not the workstation, that's the beauty of it, you don't have to worry about what the client has on their computer, as long as they can support the outputted html. cool.gif

Makenzie - Jun-20-2004 server time
I'm still a bit confused on the matter of installing PHP. I have Windows XP and my own site which has MySql...do i still need to install it?

Other than that this was a really good php tutorial. Thanks alot!!!

Red Squirrel - Apr-26-2004 server time
Glad it could help! dancingbanada.gif

Laurie Rose - Apr-26-2004 server time
Thank you much, this really helped get a start!

John - Feb-22-2004 server time
Thank you! this is a great article, with it I did understand the basic of PHP. I hope that you can write more articles like this.

Red Squirrel - Nov-09-2003 server time
Actually you can look up the fopen functions and other read/write functions and can make a file database. OR does the job require that it is a specific type (mysql for example)? I might later on release another article on data storage and talk about file and mysql database input/output.

Glad you enjoyed it. wink.gif

this article talks a bit about installing php and mysql, but only under windows. But under linux you're all set as long as you install it.

BeginnerLearner - Nov-09-2003 server time
Nice job on the artice Red!
I was wondering if you have other article(s) that explain the process of setting up PHP and MySQL?
I am a beginner and was handed a job of creating a webpage for employees to enter their suggestions, more like a "Suggestion Box". I guess I need some form of data collections method to capture data and storing it in a database for data analysis.
Any suggestions would greatly be appreciated.

Red Squirrel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 07:55 PM)
Yes, I did see both posts, one just said, "Thats crap". Forgot about that one. It could have been posted as an opinion and put in a much nicer way, which could have turned into an interesting discussion on the subject.

Yes for sure.

This whole situation is ironic. I have 908 hits (wow just realized that now) on the article, some guy most likely trolling says it sucks so I block him... with a php script I made. Later on I check my email and get someone saying he really enjoyed the article and wants to link to it and of course I said yes! Am I the only one who sees the irony here?

If I was a girl and had a diary, this would definatly be worth putting in it.
roflmao.gif roflmao.gif

Wren - Nov-08-2003 server time
Yes, I did see both posts, one just said, "Thats crap". Forgot about that one. It could have been posted as an opinion and put in a much nicer way, which could have turned into an interesting discussion on the subject.


Red Squirrel - Nov-08-2003 server time
hahahahahaha this is too funny. Maybe the article would of been better if the guy would of read it in order. roflmao.gif

He read page 1,2,5 went on the forum most likely to make his post, then read page 4,3 and 2. laugh.gif

I bet the article would of made more sense if he would of read it in order. tongue.gif

Red Squirrel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 07:14 PM)
I only saw one post.

Don't think we will see the eclipse, too cloudy here.

There was two posts, by the same person. One was longer and dissing me and the article.

I missed the eclipse, it already happened I checked. banghead.gif

edit: had the wrong time zone, did not miss it.

http://www.iceteks.com/forums/show.php/showtopic/1580


Chris Vogel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 07:14 PM)
I only saw one post.

Don't think we will see the eclipse, too cloudy here.

Well, thankfully it isn't a once-in-a-lifetime thing. smile.gif The moon is in perfect sight here. I wish I had a digital camera... sad.gif

Wren - Nov-08-2003 server time
I only saw one post.

Don't think we will see the eclipse, too cloudy here.

Red Squirrel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 07:02 PM)
You go, Red! You probably know more than that poster anyway! Just remember, it's a full moon!  laugh.gif

Thanks for reminding me, there's supost to be an eclipse tonight, not sure at what time I'll go check the news and start a thread. xyxthumbs.gif

It's super clear here too!


I put an alert similar to this for his IP:

ALL YOUR PHP ARE BELONG TO US! YOU ARE ON YOUR WAY TO CRASHING! YOU HAVE NO CHANCE TO DEBUG MAKE YOUR TIME. HA HA HA HA ...


roflmao.gif roflmao.gif Man I hope I get a scada email telling me he got the "error". biglaugh.gif

I just realized I should not have deleted his posts but just edit them out, this thread might be confusing for some. laugh.gif

Wren - Nov-08-2003 server time
You go, Red! You probably know more than that poster anyway! Just remember, it's a full moon! laugh.gif

Red Squirrel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 06:53 PM)
That's right ,Red, show them the door, it swings both ways! dancingbanada.gif laugh.gif

roflmao.gif roflmao.gif Yep. Now, time to go login to my scada thing.... written in php..... by me..... I'll show him a php trick or two.

Red Squirrel - Nov-08-2003 server time
QUOTE (Wren @ Nov 8 2003, 06:35 PM)
Don't you just love, "know it alls", full of themselves! rolleyes.gif

Yep. Funny how he said setting up php under windows is not hard. He obviously never used or heard of Linux. rolleyes.gif

I would not be suprised if this guy was from bitbender's site. banghead.gif

Gotta love trolls. I like mine diced up with almonds on the side.

Wren - Nov-08-2003 server time
That's right ,Red, show them the door, it swings both ways! dancingbanada.gif laugh.gif

Red Squirrel - Nov-08-2003 server time
QUOTE (Guest @ Nov 8 2003, 06:14 PM)
That is crap.

Posts like these and the one after are not tollerated here. bye bye 194.236.93.236.

em242.gif

Wren - Nov-08-2003 server time
Don't you just love, "know it alls", full of themselves! rolleyes.gif

Chris Vogel - Nov-08-2003 server time
There isn't any reason to call Red's work crap, "Guest". I thought it was a good article for us beginners. Discussion and comments are accepted; that's why a link to this thread is in the article, but even if you don't like the article, saying it's utter crap isn't nice.

manadren - Nov-05-2003 server time
I should probably read this one smile.gif but I don't have the time right now. Thanks Red! em320.gif

Red Squirrel - Nov-04-2003 server time
No problem, I hope it helps you!

Chris Vogel - Nov-04-2003 server time
YEA!

Merci beaucoup! dancingbanada.gif dancingbanada.gif dancingbanada.gif dancingbanada.gif dancingbanada.gif dancingbanada.gif

Red Squirrel - Nov-04-2003 server time
if you never programmed php before and would like to, this article should give you a kick start by teaching you the basic things of php. It is recomended that you know a bit of html or at least the main concept of web design. (uploading etc...)

http://www.iceteks.com/articles.php?act=vi...rticle=php&p=1&

(Showing 50 last posts, newest on top)