Page 1 of 1

Install PHP

Posted: Mon Dec 22, 2003 11:29 pm
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

Posted: Mon Dec 22, 2003 11:48 pm
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.

Posted: Mon Dec 22, 2003 11:54 pm
by ashwin
thanks for the reply. I will enquire

Posted: Tue Dec 23, 2003 12:19 am
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.

Posted: Tue Dec 23, 2003 12:41 am
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.

Posted: Tue Dec 23, 2003 12:47 am
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.

Posted: Tue Dec 23, 2003 12:58 am
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.

Posted: Tue Dec 23, 2003 1:07 am
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

Posted: Tue Dec 23, 2003 5:29 pm
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.