Jump to content

Somethings is wrong.


dezkit

Recommended Posts

Hello freaks, I have a problem, I have 2 files in 2 different servers, same host, when I use them on different hosts they both have different results.

 

1.php

<form method="post" action="2.php">
<input type="text" name="text">
</form>

 

2.php

<?php
echo "sup $text";
?>

 

When I insert blah in webserver#1 1.php, 2.php says "sup blah"

When I insert blah in webserver#2 1.php, 2.php says "sup "

 

Why does this happen? How do I enable webserver#2 to be like webserver#1?

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/
Share on other sites

Bu turning appropriate option to on in php.ini

http://www.php.net/manual/en/ini.core.php#ini.register-globals

 

However, as stated in article above you should NOT enable it.

Instead use $_POST array like this:

 

<?php
echo "sup {$_POST['text']}";
?>

Link to comment
https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/#findComment-987348
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.