Jump to content

Problem with form submission


JonasE

Recommended Posts

hello all,

 

I have run into a bit of an issue... On my three development boxes I run Gentoo, BSD and Windows with practically the same PHP config along with Apache 2. A project I recently completed was just uploaded to a client's server running Apache 2 and PHP (5.2.1). I can no longer submit any data from forms:

 

page.html

<form action="page2.php?action=insert" method="post">

 

Name<br />

 

<input size="40" name="name" type="text"><br />

<input type="submit" value="Submit">

 

</form>

 

page2.php

if(!isset($_REQUEST['action'])){

die("No function Value given");

}

$action = $_REQUEST['action'];

 

switch($action) {

case 'insert':

$name = $_REQUEST['name'];

// Create instance of database class and connect.

$mysql = new mysql();

$mysql->connect();

// Do insert.

$insert = $mysql->insert("database","name","$name");

// Redirect to main listing.

header('Location: index.php');

break;

}

 

Like I said, this has worked flawless up until now... Now when I submit I get a blank page with the URL showing as page2.php?action=insert

I thought this was due to register globals, but as far as I know, I am handling that correctly... And it is also "off" on my tests servers.

I am going crazy over this, does anyone have any idea what is going??

 

Thanks,

 

Jonas

Link to comment
Share on other sites

I have tried changing the code in several different ways already... What bothers me the most though is that, like I said, this works on 4 other servers... What in the server configuration could cause something like this? No data is being passed through forms what so ever...

 

Jonas

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.