Jump to content

[SOLVED] $_POST in IIS/PHP


cyber_ghost

Recommended Posts

hi guys...... here im am again... asking your ideas......

 

 

 

ah..... im current working in the IIS/PHP as i migrating the a shopping cart  program..... from xampp to php/iis ...

 

 

my problem here is that $_POST[] can display $_OST data from the form....

 

here is my code

------------------------------------------- myform.html

<form method="post" name="cute">

 

<input name="c_size" value="" >

 

</form>

 

----------------------------------------- receive.php

 

<?php

 

  echo $_POST

 

?>

 

in xampp in working properly.... 

 

but in PHP/IIS it display nothing....

 

I think the configuration matters..?

 

php.ini >>

 

POST_MAX_SIZE = 8m ...

 

 

 

 

please help me guys......

 

Link to comment
Share on other sites

You have no filed in your form called size. Your php code should be...

 

<?php

  echo $_POST['c_size'];  

?>

 

Also note that you really ought check your form was actually submitted before trying to display any data it may have sent. To do that, you need....

 

myform.html

<form method="post" name="cute" action="recieve.php">
  <input name="c_size" value="" >
  <input type=submit" name="submit">
</form>

 

recieve.php

<?php

  if (isset(_POST['submit'])) {
    echo $_POST['c_size'];
  }

?>

 

Next time you post code can you please post your actual code and place it within


tags.

 

Link to comment
Share on other sites

i mean.. that the information you posted above.. is the thing i meant to write... sorry for this.....

 

 

i didnt make clarification and verification before posting......... im experiencing unstable stomach..... LBM (less bowel movement)as they say....... sorry...

 

meanwhile....

 

about the problem...

is there other configuration needs to be considered about $_POST[] in IIS problem?

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

The problem is most likely due to php configuration differences between the two systems. That is about all anyone can tell you based on the information you have provided.

 

You need to post accurate code (form and form processing), because we cannot really help you if we cannot see the code that is causing the stated symptoms. There could be half a dozen different things that could cause the same symptoms you are getting.

Link to comment
Share on other sites

One of the things can can prevent all $_POST variables from being set is if the total size exceeds the POST_MAX_SIZE setting or if the POST_MAX_SIZE setting is invalid and is actually a very small value.

 

In your first post, you show "8m". Is that EXACTLY what the setting is or is it actually 8M (upper case M)? There is a specific difference between 8m and 8M. The first is invalid syntax and means 8 bytes.

Link to comment
Share on other sites

So, did you stop and start the IIS service in the control panel to get any changes made to php.ini to take effect? Just stopping and starting the web server in the management console does not cause php to reload and read the php.ini file.

 

Also, create a .php file with a phpinfo(); statement in it and browse to this file, then search/scroll down to find what the actual setting is.

Link to comment
Share on other sites

this is the actual code

 

 

----------------------------   form.html

 

<form name="myform" action="record.php" method="post">

<input name="user" type="text">

<input name="pass" type="text">

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

 

</form>

 

-------------------------------/ form.html

 

 

------------------------------- record.php

 

echo $_POST[user];

echo $_POST[pass];

 

-------------------------------/ record.php

Link to comment
Share on other sites

----------------------------   form.html

<form name="myform" action="record.php" method="post">
<input name="user" type="text">
<input name="pass" type="text">
<input name="submit" type="submit" value="submit">

</form>

-------------------------------/ form.html


------------------------------- record.php
<?php

$user=$_POST['user'];

$pass=$_POST['pass'];

if($_POST['submit']){
echo "$user <br> $pass";
}
-------------------------------/ record.php

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.