- Joined
- Dec 13, 2004
since our database teacher decided it was important for us to use a db that most webhosts don't support, i'm stuck with trying to make my forms play nice with postgres. i can't figure out why, but when i try to insert data, nothing happens. i can select and display existing data, but i can't enter anything from my forms. here's the code i used:
i've even tried adding this:
but still nothing happens. i can't even get an error to display. i can't even get a variable to display! when i include "echo $store_name;" after the insert, it doesn't display anything. what's going on here?
Code:
$query = "INSERT INTO store (store_name, address, city, state) VALUES ('$store_name', '$address', '$city', '$state')";
pg_query($query);
i've even tried adding this:
Code:
$store_name = pg_escape_string($_POST['store_name']);
$address = pg_escape_string($_POST['address']);
$city = pg_escape_string($_POST['city']);
$state = pg_escape_string($_POST['state']);
but still nothing happens. i can't even get an error to display. i can't even get a variable to display! when i include "echo $store_name;" after the insert, it doesn't display anything. what's going on here?