|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
please help me
Hello
I would like to create a form with two text boxes Country and currency.when i enter some data and hit the submit button, the data should be stored in my table.How can i implement this? My database is Interbase. Herez how i proceeded so far. ------ html> <html> <head> <title>My Form</title> </head> <body> <?php $username = "SYSDBA"; $password = "masterkey"; $connection = @ibase_connect('localhost:C:\Programmefilesexample sDatabaseemployee.gdb', $username, $password); if (!$connection) { exit ("Unable to connect to database: $connection"); } $db = 'insert into COUNTRY(COUNTRY, CURRENCY) values ( ); $bsc = ibase_query($connection, $db); Country <br> <input type="text" country="Yourcountry"> <p> Currency <br> <input type="text" currency="Yourcurrency"> <p> <input type="submit" name="submit" value="Enter the Data!"> </form> </body> </html> Could some body please help me with the above code. Thanking you in advance. |
|
#2
|
|||
|
|||
|
RE: please help me
Maybe this help.
(If the country and currency fields are text fields in your db you may have to use ' around the variables when inserting into db like this : $db = 'insert into COUNTRY(COUNTRY, CURRENCY) values ('$country', '$currency'); <html> <head> <title>My Form</title> </head> <body> <?php $username = "SYSDBA"; $password = "masterkey"; $connection = @ibase_connect('localhost:C:\Programmefilesexample sDatabaseemployee.gdb', $username, $password); if (!$connection) { exit ("Unable to connect to database: $connection"); } if ($go) { $db = 'insert into COUNTRY(COUNTRY, CURRENCY) values ($country, $currency); $bsc = ibase_query($connection, $db); } Country <form method="post"> <br><input type="text" name="country"> <p>Currency <br><input type="text" name="currency"> <p> <input type="submit" name="submit" value="Enter the Data!"> <input type="hidden" name="go" value="1"> </form> </body> </html> |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > please help me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|