LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-27-2012, 11:24 AM   #1
mzzxx11
Member
 
Registered: Sep 2012
Posts: 78

Rep: Reputation: Disabled
running apache on local machine, called from html file (debian)


Im using debian stable.

Im writing an html file (client side) which calls a php script.

The html file has a "submit" button, so when I click it the server should run the associated php file.

Ive installed php5, libapache2-mod-php5, and apache.

How do I make the server run the php after I click "submit"? this is all on the same machine (so the server is a localhost)

TIA
 
Old 12-27-2012, 01:13 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Sounds like you need to read up on HTML forms and how they work.

http://www.htmlgoodies.com/tutorials...A-Form-Huh.htm

The above guide will give you the knowledge you need and you will have no problem posting your HTML form data to a PHP script after reading over it. Let us know if you have questions
 
1 members found this post helpful.
Old 12-27-2012, 02:29 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,332

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
It would be helpful if you indicated what does happen when you click the "Submit" button. Also posting the script.
 
Old 12-27-2012, 04:35 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,712

Rep: Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279Reputation: 1279
You also might identify what distribution you are using for this.

RH/CentOS/Fedora has configuration flags to enable PHP scripts.
 
Old 12-27-2012, 05:19 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,343

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
There are many websites that show how to build/process forms with php. Basically when you click on the submit button the php script specified as the action is executed.

<FORM METHOD="POST" ACTION="my_php_script.php">

http://myphpform.com/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 01:23 PM
Running X-application on a remote AND local machine LinuxFrosh Linux - Software 1 07-04-2006 11:24 AM
In Redhat you have a file called rc.local,What is it in Ubuntu? tertius Linux - Networking 1 03-03-2006 09:27 AM
Run tomcat on a local machine through apache indika Linux - Software 0 01-11-2005 03:48 AM
Apache works on local machine, not LAN lanzdale Linux - Software 3 09-02-2003 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration