hey guys,
i have writen some php scripts for a website which transacts with mysql database..... now i have used classes, lets say i defined all basic repetitive methods like connect, select db, and stuff like that in a file called mysql.php and i have written it as a class.
Now when i define an object for it in my script like the followiing:
<?php
//form elements from previous page
$name=$POST['name'];
$address=$POST['address'];
$zip=$_POST['zip'];
$obj=new db();
$obj-> connect("root","","scp");//the problem occurs in this line
$query="insert into client_info values(null,'$name','$address','$phone','$zip','$login_name_email','$pwd',0,now())";
$result=$obj->query($query);
this works absolutely fine in IE, but in firefox it just prints the code as it is starting from connect all the way to the end of the script and doesnot even make a connection with my DB. This to me seems very strange because the browser, acc wat i though never sees php code coz it cannot ready php.... my server is supposed to be rendering the browser only with Html code and formats which my browser can understand............
I hope i have explaiined wats rong clearly..... some pointer of assistance will be very helpful.........
thanx guys
cheers
Lucky