Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#5

Re: Idhttp + PHP + SQL-Script?

  Alt 28. Aug 2006, 21:46
Na, wenns nur das ist...

du solltest die variablen per POST oder GET übergeben.

Code:
$pass = $_REQUEST['password'];
$name = $_REQUEST['username'];
$host = $_REQUEST['host'];
if (!$host)
  $host = 'localhost';
$db = $_REQUEST['db'];
$query = $_REQUEST['query'];

mysql_connect($host,$user,$pass);
mysql_select_db($db);
$result = mysql_query($query);
while ($row[] = mysql_fetch_row($result))
{
  ;
}
dann musst du nur noch das array $row in form bringen und ausgeben, z.B. direkt über print_r.
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat