Forums

$_POST ARRAY EMpty

romacron 10 Jun, 2009
Hello I had changed from FF to Chrono and o like it!!!

Something iss killing my POST array
The form::

<?php
global $mainframe,$mosConfig_live_site,$mosConfig_absolute_path;
require_once ($mosConfig_absolute_path . '/jscalendar/calendar.php');
$kalender = new DHTML_Calendar($mosConfig_live_site . '/jscalendar/','en','calendar-win2k-1',true);
$mainframe->addCustomHeadTag($kalender->get_load_files_code());
$_SESSION['user_to_send']= ($client);
?>
<table id="anfrage_table"
align="left" cellspacing="8" cellpadding="3" summary="Anfrage formular">
<tr>
<th > </th>
<td ><div align="left">
<p>Bitte geben Sie Ihre persönlichen Daten ein, </p>
<p>damit sich der Vermieter mit Ihnen in Verbindung setzen kann</p>
</div></td>
</tr>
<tr >
<th align="left">Anreise</th>
<td ><input id="journey" type="text" name="journey" /><button name="get_journey" id="get_journey" >....</button></td>
</tr>
<tr >
<th align="left">Abreise</th>
<td ><input id="departure" type="text" name="departure" /><button name="get_departure" id="get_departure" >....</button></td>
</tr>
<tr >
<th align="left">Personen</th>
<td ><select name="persons">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select></td>
</tr>
<tr >
<th><div align="left">Anrede</div></th>
<td ><div align="left">
<select name="gender" class="inputbox"/>
<option value="Herr" >Herr</option>
<option value="Frau" >Frau</option>
</select>
</div></td>
</tr>
<tr >
<th><div align="left">Familienname*</div></th>
<td ><div
align="left">
<input name="name" class="inputbox" value="" type="text"/>
</div>
</tr>
<tr >
<th><div align="left">Vorname*</div></th>
<td><div align="left">
<input name="vname" class="inputbox" value="" type="text"/>
</div></td>
</tr>
<tr>
<th><div align="left">e-mail*</div></th>
<td ><div align="left">
<input class="inputbox" name="email_to" value="" type="text"/>
</div></td>
</tr>
<tr >
<th><div align="left">Strasse*</div></th>
<td ><div align="left">
<input class="inputbox" name="address" value="" type="text"/>
</div></td>
</tr>
<tr>
<th><div align="left">PLZ*</div></th>
<td><div align="left">
<input class="inputbox" name="postcode" value="" type="text" size="5" maxlength="5"/>
</div></td>
</tr>
<tr >
<th><div align="left">Ort*</div></th>
<td><div align="left">
<input class="inputbox" name="suburb" value="" type="text"/>
</div></td>
</tr>
<tr >
<td><div align="left">Telefon</div></td>
<td><div align="left">
<input class="inputbox" name="telephone" value="" type="text"/>
</div></td>
</tr>
<tr >
<td><div align="left">Fax</div></td>
<td><div align="left">
<input class="inputbox" name="fax" value="" type="text"/>
</div></td>
</tr>
<tr
>
<td><div align="left">Information an den Vermieter</div></td>
<td><div align="left">
<textarea class="inputbox" name="frage" id="frage" cols="45" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td></td>
<td><p>
<input type="submit"
class="button" name="Anfrage senden"/>
</p></td>
</tr>
</table>
<input type="hidden" name="client"value=""/>
<script type="text/javascript">
Calendar.setup({
inputField:"journey",
ifFormat:"%d.%m.%Y",
showsTime:false,
firstDay:1,
button:"get_journey",
cache: true,
step:2
});
Calendar.setup({
inputField:"departure",
ifFormat:"%d.%m.%Y",
showsTime:false,
firstDay:1,
cache:true,
button:"get_departure",
//*
step
:
2
//*
});
</script>



NOTE // @localserver it will be function

Autogen_script::
 <?php
global $database;
srand((double)microtime()*10000);
$inum
=
"I" . substr(base64_encode(md5(rand())), 0, 16);
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES
(
'' , '".$inum."','". date('Y-m-d')." - ".date("H:i:s")."', '".$_SERVER['REMOTE_ADDR']."' , '".mosGetParam($_POST,'journey','')."' , '".mosGetParam($_POST,'departure','')."' , '".mosGetParam($_POST,'persons','')."' , '".mosGetParam($_POST,'gender','')."' , '".mosGetParam($_POST,'name','')."' , '".mosGetParam($_POST,'vname','')."' , '".mosGetParam($_POST,'email_to','')."' , '".mosGetParam($_POST,'address','')."' , '".mosGetParam($_POST,'postcode','')."' , '".mosGetParam($_POST,'suburb','')."' , '".mosGetParam($_POST,'telephone','')."' , '".mosGetParam($_POST,'fax','')."' , '".mosGetParam($_POST,'frage','')."' , '".mosGetParam($_SESSION,'user_to_send','')."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
echo '<script> alert("wir haben Ihren Eintrag erhalten ");
</script>
';
return;
?>



I cant find the error every time it tells me " echo "You are not allowed to access this URL directly, POST array is empty";"


opensef last
joomla 1.0.15
Thanx for helping
GreyHead 10 Jun, 2009
Hi romacron,

Really hard to tell - my best guess is that there is an error in your php and the $_POST array is empty.

I tried to test but you are requiring files that aren't in the standard Joomla 1.0.15 installation.

I suggest that you comment out most of the code to get to a couple of simple inputs, then add sections back until you find what's causing the problem.

Bob
GreyHead 10 Jun, 2009
Hi Roman,

I'm baffled - is that array you are showing $_REQUEST? If so you can see that there are no 'post' entries in there. But they are being sent to your server

senden Submit Query
text sdfgfdsgfgd



Bob
romacron 10 Jun, 2009
Dear Grey Head

request reflects cookies post and get vars (only for debugging i use this);

yes it will be sendet and the result comes to me(per mail ) but something eats the post😟
romacron 10 Jun, 2009
Okay thanks for helping I found the error
i have disabled the open_sef now i will look espezially

Good Times for you😛
This topic is locked and no more replies can be posted.