PHP deprecated code?
<p>HI all</p>

<p>Running PHP Version 5.2.11 and we've been given a site which we're told was running on an earlier version (4 possibly).</p>

<p>We've an odd problem where several pages which have a bunch of forms which update the MySql are not working. The problem is where the variables used in the update script are not being defined anywhere in the php before hand. eg.</p>

<pre><code>UPDATE users SET FirstName='$form_firstname'WHERE UserID='$id'"
</code></pre>

<p>Now if we change it to..</p>

<pre><code>$form_firstname = $_POST['form_firstname'];
UPDATE users SET FirstName='$form_firstname'WHERE UserID='$id'"
</code></pre>

<p>then the update works. We could do this for every single variable defined in every update statement but I'm thinking that seen as this must have worked previously we're looking at some deprecated code somewhere that forms these variables. I've looked for any </p>

<pre><code>import_request_variables
</code></pre>

<p>statements but nada.</p>

<p>Can anyone think of anything that would be turned off by default in a new server that would cause this or does this variable have to be declared somewhere?</p>

<p>Cheers muchly</p>
