Jump to content

can script handle client information?


Scud

Recommended Posts

<?php
$con = mysql_connect("localhost","user","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }mysql_select_db("mydata", $con);$sql="INSERT INTO my table(var1, var2, var3, var4, var5, var6)
VALUES
('".mysql_escape_string($_POST[var1])."','".mysql_escape_string($_POST[var2])."','".mysql_escape_string($_POST[var3])."','".mysql_escape_string($_POST[var4])."','".mysql_escape_string($_POST[var5])."','".mysql_escape_string($_POST[var6])."')";if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "Record has been added";mysql_close($con)
?>

 

My php file is looking very similar to that, however because i'm not the best with php im wondering if a script like that is secure enough to handle client information? please respond!

Link to comment
https://forums.phpfreaks.com/topic/101445-can-script-handle-client-information/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.