Closed AlJohri closed 9 years ago
Hey, I am working on it there is a problem with the hosting site and I had a conversation with the TA regarding this on friday. The database works when used on my laptop server which I did show to him on Friday. Regards, Aakash Anand Mishra
On Jan 19, 2015, at 2:22 PM, Al Johri notifications@github.com wrote:
Clicking the "Sign Up" button on your landing page http://transad.x10host.com/register.html returns the php submission code with your database password. Please fix this.
You can simulate this with the following command:
curl -X POST http://transad.x10host.com/submit1.php --data "first_name=Al&last_name=Johri&email=al.johri@gmail.com" Returns:
<?php define('DB_NAME', 'table_input'); define('DB_USER', 'root'); define('DB_PASSWORD', 'Aakash'); define('DB_HOST', 'localhost');
$link = mysql_connect("localhost",DB_USER,DB_PASSWORD);
if (!$link) { die('Could not connect: ' . mysql_error()); }
$db_selected = mysql_select_db(DB_NAME, $link);
if (!$db_selected) { die('Can\'t use ' . DB_NAME . ': ' . mysql_error()); }
$first = $_POST['first_name']; $last = $_POST['last_name']; $email1 = $_POST['email'];
$sql = mysql_query("INSERT INTO user_input (first_name, last_name, email) VALUES ('$first', '$last', '$email1' )");
if (!$sql) { die('Error:'. mysql_error()); }
?> — Reply to this email directly or view it on GitHub https://github.com/nuvention-web/Transad/issues/3.
Sounds good.
Clicking the "Sign Up" button on your landing page returns the php submission code with your database password. Please fix this.
You can simulate this with the following command:
Returns: