PHP secure connection

  • balaguru_s
  • Born
  • Born
  • balaguru_s
  • Posts: 1

Post 3+ Months Ago

Establish a secure connectivity to web server using PHP? how It is?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • sandy_j_sam
  • Newbie
  • Newbie
  • sandy_j_sam
  • Posts: 9

Post 3+ Months Ago

I Think that, you ask, How we establish connection php with database, because on localhost don't need for external connection Just see them,
and if am wrong way, then please mention proper query, I'll solve them.


<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (mysql_query("CREATE DATABASE db_name",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}

mysql_select_db("db_table_name", $con);
$sql = "CREATE TABLE sample_table
(
FirstName varchar(15) NOT NULL,
LastName varchar(15) NOT NULL,
)";
mysql_query($sql,$con);
mysql_close($con);
?>
  • onlyican.com
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1589
  • Loc: Hants, UK

Post 3+ Months Ago

Or if you trying to have PHP read files on the server, u need fopen and CHMOD settings

OR Secure Connect SSL certificate (Example used when making payments)

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 162 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.