Forums

No DB entrys Joomla 1.0.15

FeedTheMonkey 11 Mar, 2008
Hi i just read a lot of postings with similar Problems,
but I never found a solution that got my Problem worked.

First some basic Informations:


Im using a local webserver in a VM but it works without Problems.

Apache: 2.2.8
PHP : 5.2.5
MySQL: 5.0.51
Chrono Forms: 2.3.8.1

Joomla! Register Globals Emulation: OFF
Register Globals: OFF
Magic Quotes: ON
Safe Mode: OFF
File Uploads: ON
Session auto start: OFF


What I want to do is following:


I want to write the Form Data in the DB and later read them out to use them for a new Module.
The problem is, that it doesnt save anything in the DB, it only gets me into the same Form again.

Do I need to make an special Entry for the Action Settings?

Here the Form Code:





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Supportanfrage</title>
</head>

<body>
<table width="457" border="0" align="center">
  <tr>
    <td width="210">Name:</td>
    <td width="231"><form id="form1" name="form1" method="post" action="">
      <label>
        <input type="text" name="name" id="name" />
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td>Vorname:</td>
    <td><form id="form2" name="form2" method="post" action="">
      <label>
        <input type="text" name="vorname" id="vorname" />
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td>E-Mail:</td>
    <td><form id="form3" name="form3" method="post" action="">
      <label>
        <input type="text" name="email" id="email" />
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td>Telefon:</td>
    <td><form id="form4" name="form4" method="post" action="">
      <label>
        <input type="text" name="tel" id="tel" />
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td>Welche Art Problem haben Sie?</td>
    <td><form id="form5" name="form5" method="post" action="">
      <label>
        <select name="category" id="category">
          <option>Hardware</option>
          <option>Software</option>
          <option>Internet</option>
          <option>E-Mail</option>
          <option>Homepage</option>
        </select>
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td>Geben Sie hier Ihre genaue Fehlerbeschreibung ein!</td>
    <td><form id="form6" name="form6" method="post" action="">
      <label>
        <textarea name="description" id="description" cols="45" rows="5"></textarea>
        </label>
    </form>    </td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td>Wir bedanken uns für Ihre Anfrage und werden Ihnen innerhalb der nächsten 24 Stunden eine Antwort geben.</td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <tr>
    <td> </td>
    <td><form id="form7" name="form7" method="post" action="">
      <label>
      <input type="submit" name="send" id="send" value="Senden" />
      </label>
    </form>
    </td>
  </tr>
</table>
<blockquote> </blockquote>
</body>
</html>




And here the automatically generated DB Query:



<?php 
	global $database;
	
$database->setQuery( "INSERT INTO #__chronoforms_1 VALUES  (
'' , '". date('Y-m-d')." - ".date("H:i:«»s"«»)."', '".$_SERVER['REMOTE_ADDR']."' , '".mosGetParam($_POST,'name','')."' , '".mosGetParam($_POST,'vorname','')."' , '".mosGetParam($_POST,'email','')."' , '".mosGetParam($_POST,'tel','')."' , '".mosGetParam($_POST,'category','')."' , '".mosGetParam($_POST,'description','')."');" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."'); window.history.go(-1); </script>
";
}
?>



I hope i sent you all the neccessary data

Thank you
FeedTheMonkey 11 Mar, 2008
Fixed The Problem ... first of all DW gave me messy Code for the form and Second I didnt add Submit to the DB fields.

Works fine
This topic is locked and no more replies can be posted.