LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-20-2003, 10:46 AM   #1
Mikessu
Member
 
Registered: Sep 2003
Distribution: Gentoo, FreeBSD 5.1
Posts: 122

Rep: Reputation: 15
PHP problems


I have strange problem with php. When Im trying to send data by form using post method it never works (it just goes back to same page and that happenes with every script I use). Have I configured php right?

example:
http://www.tollo.darktech.org/ftp.php

When I click login button it goes back to same page and doesn't execute script. I have installed php and phpinfo works.

EDIT:
The link above doesn't work because I removed the file already.

Last edited by Mikessu; 09-21-2003 at 05:00 AM.
 
Old 09-20-2003, 02:31 PM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
that just gave me a 404 page not found error.

but here is what i do for that:
Code:
<html>
<body>
<form method="POST" action="nextpage.php">
<input type="hidden" value="applejacks" name="cereal">
<input type="submit" value="Submit">
</form>
</body>
</html>
put that in a file called page.html

then create a file called nextpage.php and put this in it:

Code:
<?php
              $cereal = $_POST['cereal'];
                echo "<HTML>";
                echo "<BODY><BR><BR><BR><CENTER>";
               echo "My favorite breakfast food is $cereal";
               echo "</BODY></HTML>";
?>
if it doesnt work, holla back.

Last edited by Robert0380; 09-20-2003 at 02:34 PM.
 
Old 09-20-2003, 02:35 PM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
i just tested that for kicks and it works:


but my favorite cereal isnt really applejacks, that's just what came to mind when i wrote that.

on the 1st page you''ll just see a submit button becaue the input is hidden, on the second page you should see


My favorite breakfast food is applejacks
 
  


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
More PHP problems :( arichardson Linux - Software 1 11-21-2005 03:24 PM
PHP problems PLEASE HELP!! mrosati Linux - Software 2 10-15-2004 04:01 AM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
Problems with PHP :( AMMullan Linux - Software 7 12-02-2003 10:25 AM
problems with php jogurt666 Linux - Software 12 11-17-2003 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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