Click to See Complete Forum and Search --> : php4 or php5


zebdaag
02-07-2007, 11:25 AM
hi,

i'm working on a simple CMS system i did this several times before and it always worked till now. I am trying out a new webhost..

I got this simple form:

<form id="additems" name="additems" method="post" action="upload.php" enctype="multipart/form-data" onsubmit="document.getElementById('iFrameHidden').value=document.getElementById('iView').contentWindow.documen t.body.innerHTML;">
<table width="100%" border="0" cellpadding="3" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="70" align="left" valign="middle">Land:</td>
<td width="258"><label>
<input name="land" type="text" id="land" size="30" />
</label></td>
</tr>

<tr>
<td colspan="2" align="left" valign="middle"><label>
<input type="submit" name="Submit" value="Submit" />
<input type="reset" name="Reset" value="Reset" />
</label>
<input name="iFrameHidden" type="hidden" id="iFrameHidden">
<input name="id" type="hidden" id="id">
</td>
</tr>
</table>
</form>


and this simple php page on my server called upload.php

<?
echo $land;
?>


it was much more complex but i stripped the code till i had this left but it is still not working. i found out that my new host is using php4 and not php5 can this be the problem why it is not echoing he text?? if this is the problem how can i solve it??

Thanks in advance!

apg88
02-07-2007, 11:53 AM
Your host must have Register_globals off for security reasons.

Use this:
echo $_POST['land'];

zebdaag
02-07-2007, 12:03 PM
ah thanks that worked fine!!
stupid i didn't think of that!