for ($i=0; $i<count($_POST['block']); $i++)
{
$sql = "INSERT INTO PLD_CLIENT_CATEGORIES (ID, CAT_ID) VALUES ('".$_SESSION['link_id']."', '".$_POST['block'][$i]."')";
mysql_query($sql) or die (mysql_error());
//add more data ot the existing file
$_POST['block'][$i]=$r
append_file("customers/test1.txt","<item>\n<title>Title in here</title>/n<link>othersites.php?c=\"$r\"</link>/n</item>");
}
Hello, I'm having serious difficulties with the above bit of code not being parsed, and I have searched high and low for a solution. I have three problems, in order of urgency as follows:
1 - I need to add the category id for each iteration into the text file. At present I am using $_POST['block'][$i]=$r then calling $r, but this isn't working - is there any way to return the value of this iteration and insert that value into the text file?
2 - I could also do with calling the category name from the database, but once I have figured out #1, Im pretty sure I can code this myself!
3 - I am also trying to create the text file with a title based on a value in the session array - $_SESSION['link_id'] instead of test1.txt - how would I crowbar that result into this bit of code?
//create file
write_file("customers/test1.txt","<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n <rss version=\"2.0\">\n <channel>\n");
The purpose of this is to create an xml feed file based on user selections from a form. The xml feed will then create a series of links to further feeds - the customers selections will determine which feeds will show on their site.
Any and all help very very much appreciated!