Re: [PHP-LANG] problem with From and PHP ....

[email protected] (Derick Rethans) Thu, 26 Dec 2002 11:40:13 +0100 (CET)
Newsgroups php.lang,php.qa
Message-ID <[email protected]>
Hallo,

dit is niet de lijst om gebruikersvragen te stellen, hiervoor kun je het 
beste terecht op [email protected]. De php-lang@ lijst is voor 
taal specificaties, en php-qa@ is voor Quality Assurance.

Groeten,
Derick


On Wed, 25 Dec 2002, Pieter Vunckx wrote:

> Hello,
> 
> I'm trying to put a html together with php
> but i'm stuck ....
> I have this in my html code:
> <?php
> $db=mysql_connect ("localhost", "Pieter", "test") or
> die ("Verbinding  mislukt");
> mysql_select_db("beoordeling",$db);
> $dbnaam="beverenhome";
> $query1=mysql_query ("SELECT avg(De_Wilde) FROM $dbnaam");
> $query2=mysql_query ("SELECT avg(Deschacht) FROM $dbnaam");
> $gemDe_Wilde = mysql_result ($query1,0);
> $gemDeschacht = mysql_result ($query2,0);
> ?>
> <form name="punten" action="punten.php" method="get">
> <input type="hidden" name="redirect"
> value="http://www.anderlecht-online.com/thanks.html" />
> 
> <td valign="top" width="60%">
> <select name="De_Wilde" size="1">
> <option value="0" selected>0</option>
> <option value="1" selected>1</option>
> <option value="2" selected>2</option>
> <option value="3" selected>3</option>
> <option value="4" selected>4</option>
> <option value="5" selected>5</option>
> <option value="6" selected>6</option>
> <option value="7" selected>7</option>
> <option value="8" selected>8</option>
> <option value="9" selected>9</option>
> <option value="10" selected>10</option>
> </select>
> De Wilde</td>
> <td valign="top" width="40%">
> <FONT COLOR=#000000 FACE="times new roman" SIZE="4"><center><?php
> printf("%0.1f", $gemDe_Wilde) ?></center></td>
> </tr>
> 
> ....
> 
> and now I want to INSERT a line in my database ...
> 
> mysql_query ("INSERT INTO $dbnaam (De_Wilde) VALUES ('$De_Wilde')");
> 
> but he gives me an error ....
> Notice: Undefined variable: De_Wilde in D:\www\test\punten.php
> 
> Help :-)
> 
> 
> 
> 
> -- 
> PHP Language Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 

-------------------------------------------------------------------------
 Derick Rethans                                 http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals       http://php-mag.net/
-------------------------------------------------------------------------