Jump to content

Quick Fix!! Loops - driving me loopy


chestnuth

Recommended Posts

Yes, seperated by a space!

 

Thanks for that!!

 

However, when i run this code it produces this:

 

Value: A1

Value: A2

Value: A3

Value: A5

Value:

 

and i am left with an empty value at the end, is this to do with my code?

 

<?php

session_start();

if (isset($_SESSION['username']) == false)

{

header("location:login.php");

exit();

}

$values = explode(' ', $_POST['thenames']);

foreach ($values as $value)

{

    echo "Value: $value<br>";

}

//header("location: changecontrol.php?var=change_control.ccid desc&view=1");

//exit();

?>

thanks!!

Thanks guys, brill!!

 

i now want to use the id i got from the loop so 'A1' to start with. This will allow me to pick up the contents of the text box with the same name.

 

would i need to use something like this?

echo $_post['.$value.'];

 

or am i on the wrong lines completely?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.