Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Edit XML with PHP Re: Edit XML with PHP

#78356

Ok here is what I have found:

Instead of giving the nam attribute, title0, title1, title2, title3, etc.
I gave it, title[0], title[1], title[2], title[3], etc. and the same for pricing and description.

So that automatically puts it into an array. So when I click submit on my form it goes to a php file:

Code:
“;
}
$price = $_POST[‘price’];
foreach ($price as $p) {
echo “$p
“;
}
$description = $_POST[‘description’];
foreach ($description as $d) {
echo “$d
“;
}
?>

and the output is:
Package 1
Package 2
Package 3
Package 4
Package 5
$750
$1250
$1750
$2000
$3000
This is a description for Package 1.
This is a description for Package 2.
This is a description for Package 3.
This is a description for Package 4.
This is a description for Package 5.

Its not using sessions, but is this what you were talking about?