Install PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashwin
Forum Newbie
Posts: 8
Joined: Mon Dec 22, 2003 11:29 pm

Install PHP

Post by ashwin »

Hello,
I need to know whether I need to install PHP on my machine or not. I typed this code

<?
phpinfo();
?>

and saved it as phpinfo.php and when I opened it in the browser a blank page was displayed. How do I know that the server which I am working on is installed with PHP.

Thanks
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

Depends if the server software is running, and if PHP is even configured for the server software. If either of these things aren't true, PHP code won't be parsed, even if PHP is installed. No offense, but based on your post I'm assuming you're not the administrator of this system, so to answer your question, the way to find that out is to ask.
ashwin
Forum Newbie
Posts: 8
Joined: Mon Dec 22, 2003 11:29 pm

Post by ashwin »

thanks for the reply. I will enquire
ashwin
Forum Newbie
Posts: 8
Joined: Mon Dec 22, 2003 11:29 pm

Post by ashwin »

I need to enquire with the company I guess. I need to receive the clicked answers in a form written in HTML and Javascript to my email account. Can I use CGI for this...if they doesnt support PHP.

Thanks again.
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

No scripting language at all is absolutely necessary for that, but it's a good idea to use a mail-handling script anyway, since IE6 won't let you use a mail form without one. Any scripting language with a mail function will do what you want. PHP, ASP and Perl are the most common. Your admin should be able to tell you what's available on your machine.
ashwin
Forum Newbie
Posts: 8
Joined: Mon Dec 22, 2003 11:29 pm

Post by ashwin »

So you are saying that I could use "mailto:"...but you know its not reliable. Also, here is the clear picture.

I have created a form using HTML and Javascript and with a Submit button. So, when the user clicks on the Submit button the selected answers need to be sent to an email account. Do you think that PHP would be fine or shall I go with CGI/Perl. May be also when the user clicks on the Submit button I need these values to be stored in an excel file(if possible). Hope I was clear.

Thanks again.
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

Perfectly clear. PHP would be fine for that job (actually it'd be my first choice). As for the Excel thing, I don't know anything about that, you'll have to hope someone else on here does.
ashwin
Forum Newbie
Posts: 8
Joined: Mon Dec 22, 2003 11:29 pm

Post by ashwin »

thanks a lot for your help. One last query. You said that its not necessary for any language to use. may i know what did you mean to use to do this. I mean "mailto:" to send an email??..

thanks
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post by uberpolak »

Yes, you can set the action attribute of your form to "mailto:address@example.com"

The problem with this is that IE6 (and probably other new browsers) don't support that anymore, so a large portion of your users won't be able to use it. Using a script of some kind is a better solution.
Post Reply