Search Mac Software Downloads
|
  Main   Members
User "elovez" Profile
user image
About emma
Real Name:emma i 
Last Login:19 Feb 2009 02:44
Posts:1
Recent Downloads:
(none)
User Reviews


icon
MAMP
Feb 19 2009

ELOVEZ  please help me how to connect to mysql. this is the old script i used by PHPTRIAD on windows, but its didnt work in MAC with MAMP

$host=localhost;

$user="root";

$pass="root";

include"ver.php";

if($valid==true):

$link = mysql_connect ("$host", "$user", "$pass")

or die ("fail to connect");

$tanggal= date("Y-m-d");

$wmk="insert into faq //name of table// (tanggal,nama,email,pertanyaan)

values('$tanggal','$nama','$email','$pertanyaan')";

mysql_select_db("sd");

$query=mysql_query ($wmk,$link);

if ($query)

{ echo " Sukses pengentrian tabel"; }

else

{ echo " Gagal pengentrian tabel "; }

{

echo("Thank you $nama for your question, please wait the confirm for a moment, Your data:");

echo("tanggal :$tanggal");

echo("Nama : $nama");

echo("email : $email");

echo("pertanyaan : $pertanyaan");

echo("");

echo("");

}

?>

  
(Version 1.7.2)

praisebury
0
[ Reply ]

The opinions expressed in the reviews are not necessarily those of MacUpdate.
MacUpdate waives any legal binding related to the comments and opinions expressed in the reviews.
Please contact MacUpdate politely if you wish for a comment to be reviewed by MacUpdate for removal.