If you're popping this into an HTML page, then a newline actually doesn't do anything to the output. If you view source the page you've included the php in, then you will see that it probably did, in fact, insert a new line. I would guess the View Source would look something like this:
This...
As a quicker answer (though I highly recommend the excellent FAQs on this site), replace your AND with just a comma. You might also grab a mysql manual site and read up on the UPDATE syntax (I check it all the time, whenever there is a problem... sometimes my brain fills in things that ought...
Glad it worked for you Chris.
As for the concatenation... there are about six ways to do anything in PHP, it seems, and we all have our favourites. :)
Marc
Something else to try is putting a different one at the top of the list to see if it will pull up that information. Just a long-shot, but it will tell you that the data and the query are OK. Maybe post again your php pages and an output of the table.
Marc
If you modified the values of the select items, did you go and modify your query appropriately as well?
$result = mysql_query("SELECT * FROM producers WHERE producer_code='".$_POST['Producers']."'");
Marc
Yep, PHP_SELF will return the name of the current page, but give this a go:
<?php
$addr = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
echo($addr);
?>
Marc
Ken: I wasn't sure what the implode() would do with only one item in the array, and I think I misread what jasboy said to mean that he actually had tried it and gotten an error - and thus assumed that implode() tacked on a comma and that was causing a problem or something. I like your way...
I like to keep my php variables separate from strings... What Ken said should work as well, but for my own part I would type it like this:
$make = "Acura";
$query = "SELECT DISTINCT model FROM ".$table." WHERE make = '".$make."'";
echo($query);
That last line is just for troubleshooting...
Something you could try is to make the values numeric, which means you'd have to add an index field to your table in the db. Functionally it shouldn't make a lot of difference, but it would eliminate the possibility of string-matching problems.
For example:
<select name="Producers" size="1"...
Has the problem happened again, or did you try a second time? It might have simply been coincidental to you connecting, but not a result of the connection. Did you get a chance to look at the Task Manager and see what process what taking up all the CPU time?
I think the Remote Desktop client...
What Franklin says is not really going to affect client-side at all. If it was vital to have the clients at the same time as the server, Novell wouldn't have provided functionality for disabling it. Changing the time on the server can be a gigantic headache because it can affect a lot of...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.