I have a php file that looks like this:
<?php
include("config.php"); // put the *FULL* path to the file.
$values = $_POST;
foreach ($values as &$value) {
$value = mysql_real_escape_string($value);
}
$sq1="INSERT INTO applicant (app_trn,app_file_id)
VALUES
('$values[app_trn]','$values[app_file_id]')";
?>
and this Is my config.php file:
<?php
$link = mysql_connect('localhost', 'root', 'password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('lms', $link);
?>
How ever when It is not working I cant seem to find the problem, Im a bit fresh to php and mysql so could you please oversea this and see if i have any errors
It seems you code doesn’t suppose to do anything, is it possible you forgot to send the query to mysql? if so… :