The experienced and inexperience repeatedly recommend and urge me to look into using MySQL. I barely, and I cannot stress this enough, “barely” know how to use php let alone MySQL. I was going to save anywhere from 100 records upwards to 1000s of records using individual text files that a php script would make. The script I was toying with that that was an example I altered slightly was what I was planning to use for the Storage/Saving method.
To understand the php script on some level, I used a free website and host. To have
MySQL it looks like I will have to shell out some money although a small amount and would want to be able to actually use it and not look at the php manual online and the MySQL website and scratch my head as I have been doing.
From my understanding MySQL on a website would be accessible through a webpage and not from a program from my home computer. At least that is what one hosting site said. It really isn’t a huge deal as long as it just works and I can look at the data or change it on some rare occasion.
Below is the simple php script I was planning to use to create the log file for individuals records. If anyone would show me what a very simple script like this would look like if it was to tell MySQL to save an entry it might help be able to start somewhere.
The information being sent is a string like this “DragonMuir,00000,00000,34,23,4,3,5,89,2,3,4,53,4” Each “,” separates a single piece of data. All the data relates to “DragonMuir” All that I need is to be able to send that information, for it to be stored online, and if requested sometimes, to tell SL the last or current entry made to update the information in SL if a new item is created to replace the old or to restore the information when that scripted item is destroyed or malfunctions.
If anyone can find it in their hearts to mentor me or help me here with some example or guidance I would be very grateful, because unless I have this ability I cannot complete the project I have been working on.
^.=.^
string url = "http://www.ExampleWebsite.com/test.php?search=";
string savedgameinformation;
//SAVE--------------------------------------------------------------SERVER
// get data back and process it
http_response(key request_id, integer status, list metadata, string body)
{
if (body == "Error: Cannot open file."

{
llOwnerSay(body + " please check your webserver and logfile"
;}
else if (body == "data saved"

{
llSay(0,"Your Game data has been saved"
;}
end();
}
timer()
{
llSay(0,"server timeout, please try again in a moment"
;end();
}
//SAVE--------------------------------------------------------------SERVER
<?php
$search = $_GET["search"];
$filename = substr($search,0,25).".dta";
$user_data = file($filename);
// if its not write the name in the file
{
$fp = fopen($filename,"a+"
;// if your server cannot access the file error
// almomst any php server can make a file if one does not exist
// even if your server will not create a file for you
// you can place an empty file for the script to use
// you really have to screw up to get this error
if(!$fp)
{
echo "Error: Cannot open file.";
exit;
}
fwrite($fp,$search."\n"
;fclose($fp);
echo "data saved";
}
?>