latheesan
09-19-2005, 04:48 PM
I was wondering, if this is possible
read a file called "DTunnel.ini" in the folder called /files and then attach every lines of text to a string, so that at the end of reading the file, i could insert the values on the strings to the db automatically
for e.g.
this is the content of the file "DTunnel.ini"
name=DTunnel
description=Maneuver your ship through the tunnel without crashing into the sides. The longer you last, the tunnel becomes narrower and wilder and the speed of your ship increases.
author=DBarbarian
width=400
height=250
bgcolor=FFFFFF
so read the file and assign each lines to strings like this:
$name = "DTunnel";
$description = "Maneuver your ship through the tunnel without crashing into the sides. The longer you last, the tunnel becomes narrower and wilder and the speed of your ship increases.";
$authour = "DBarbarian";
$width = "400";
$height=250
$bgcolour = "FFFFFF";
once the lines of text assigned to the strings like i showed above, i cud run this query
include ("admin/db.php");
$query = "INSERT INTO games VALUES ('$name', '$'description, '$authour ', '$height','$bgcolour')";
echo "Game Installed In The DataBase";
?>
What do you guys think, is this possible?
read a file called "DTunnel.ini" in the folder called /files and then attach every lines of text to a string, so that at the end of reading the file, i could insert the values on the strings to the db automatically
for e.g.
this is the content of the file "DTunnel.ini"
name=DTunnel
description=Maneuver your ship through the tunnel without crashing into the sides. The longer you last, the tunnel becomes narrower and wilder and the speed of your ship increases.
author=DBarbarian
width=400
height=250
bgcolor=FFFFFF
so read the file and assign each lines to strings like this:
$name = "DTunnel";
$description = "Maneuver your ship through the tunnel without crashing into the sides. The longer you last, the tunnel becomes narrower and wilder and the speed of your ship increases.";
$authour = "DBarbarian";
$width = "400";
$height=250
$bgcolour = "FFFFFF";
once the lines of text assigned to the strings like i showed above, i cud run this query
include ("admin/db.php");
$query = "INSERT INTO games VALUES ('$name', '$'description, '$authour ', '$height','$bgcolour')";
echo "Game Installed In The DataBase";
?>
What do you guys think, is this possible?
