Sorry to bother you but i'm a beginner when it comes to coding and i'm kind of stuck.
I've searched the web and tried multiple suggestions (also some of the ones posted here) but it keeps on failing.
Short description:
I'm working on a project inside repl.it -> https://php--olvier79.repl.co
I have an index.php
Inside that index.php i have a foreach loop.
The foreach loop works fine and prints the output i want on the page after submit.
foreach ($_POST as $name => $value)
{
print "{$name}: {$value}<br />";
}
The problems start when i want to clean up the output using if, elseif and else statements;
I've tried multiple suggestions but this is the one i'm currrently stuck with:
foreach ($_POST as $name => $value)
if ($value = "Submit")
{
print " Data received Processing";
}
elseif ($value = "")
{
print "";
}
else
{
print "{$name}: {$value}<br />";
}
Any help would be much appreciated.
Aucun commentaire:
Enregistrer un commentaire