LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 10:24 AM   #1
mzzxx11
Member
 
Registered: Sep 2012
Posts: 86

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, 12: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, 01:29 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

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

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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, 04:19 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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



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 12:23 PM
Running X-application on a remote AND local machine LinuxFrosh Linux - Software 1 07-04-2006 10:24 AM
In Redhat you have a file called rc.local,What is it in Ubuntu? tertius Linux - Networking 1 03-03-2006 08:27 AM
Run tomcat on a local machine through apache indika Linux - Software 0 01-11-2005 02:48 AM
Apache works on local machine, not LAN lanzdale Linux - Software 3 09-02-2003 09:16 PM

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

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration