RE: Problem with form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is your question a javascript or PHP question?

For PHP you can do this:

$omr = $_POST['omr'] ;
       	if(is_array($omr))
	{
        	for($k=0; $k<count($omr); $k++)
`		{
                     	$sql->Insert("insert into omr (omrID,omrNumber) values
('$omrID','$omr[$k]')");
			$affected_rows = $sql->a_rows;
	       	}

		if ($affected_rows == 1)
		{
			echo "omr <font color=red>". $omrID . "</font> omr successfully added to
the database.\n<BR />";
		} else {
			echo "omr <font color=red>". $omrID . "</font> omr was not successfully
added to the database.<BR />Please try again.\n<BR />";
		}

	}



Thanks,

John Ellingsworth
http://mail.med.upenn.edu/~jellings/
AIM: vc2000support

-----Original Message-----
From: Disko_kex [mailto:disko_kex@swedish-mushroom.com]
Sent: Thursday, February 05, 2004 10:04 AM
To: php-windows@lists.php.net
Subject:  Problem with form


Hi

If a have a <select name="omr[]">, what is the name of the "select"? I
tried with both "omr" and "omr[]", but no one works. It works fine if
the name is "omr" but then it is only one value posted.

Maybe its easier to understand if you see it yourself:
http://www.lokalguiden.se/index2.php?action=ledigalokaler
It's the second select I must name omr[] to get all the values posted
but then the javascript doesn't understand the name omr[], what to do?

Thx.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux