triplikeido Posted November 9, 2008 Share Posted November 9, 2008 Hi there. I'm having a lot of trouble because I can't get my php page receive some variables from the html form. Need help please. Here is the form: <FORM METHOD="POST" ACTION="quota.php"> <TABLE BORDER="1"> <TR> <TD>Ano:</TD> <TD> <INPUT TYPE="TEXT" Name="Ano" ID="Ano" SIZE="50"></TD> </TR> <TR> <TD>Valor da Quota:</TD> <TD> <INPUT TYPE="TEXT" Name="Valor" ID="Valor" SIZE="50"/></TD> <TD><input type="submit" Value="Inserir Quota"/></TD> </TR> To receive the arguments in: <? $Ano = $POST['Ano']; $Valor = $POST['Valor']; echo "$Ano<br>"; echo "$Valor<br>"; $conn_str = "host=******** port=5432 user=u57976 password=***** dbname=u57976"; $connection = pg_connect($conn_str) or die("Couldn’t connect to server"); $query = "INSERT INTO quota VALUES($Ano, $Valor)"; $result = pg_query($query) or die ("Not succeeded"); ?> How can i fix this? Thanks. Link to comment https://forums.phpfreaks.com/topic/132047-solved-html-form-php-postgresql-functions-help-neededsolved/ Share on other sites More sharing options...
triplikeido Posted November 9, 2008 Author Share Posted November 9, 2008 Problem solved. Missed the underscore in _POST['..'] Link to comment https://forums.phpfreaks.com/topic/132047-solved-html-form-php-postgresql-functions-help-neededsolved/#findComment-686181 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.