Hello, and welcome to PHPBuilder.
Please try and use the [noparse]
[/noparse] tags around your code; this can help us in debugging due to its syntax highlighting, and it keep the page length shorter in the event code excerpts are very long.
stvnkrs10;11034839 wrote:Thanks for the direction. I need to get up to date on mysqli, being self taught I didn't even know about it until I saw your signature.
In its most basic form, it's replacing "mysql" with "mysqli" in all your function calls and adding the connection identifier as a first parameter to them:
//OLD
$conn = mysql_connect($host,$user,$pass);
$sel = mysql_select_db($dbname);
$sql = "select foo from bar;";
$res = mysql_query($sql);
//NEW
$conn = mysqli_connect($host,$user,$pass,$dbname); // no more need for "select_db" for the initial connection
$sql = "select foo from bar;";
$res = mysqli_query($conn,$sql); //first param necessary; this allows for easy management of multiple connections.
MySQLi is also[SUP][/SUP] object-oriented, so the "New" example above could be written as:
$conn = new Mysqli($host,$user,$pass,$dbname);
$sql = "select foo from bar;";
$res = $conn->query($sql); //first param NOT necessary, because you've specified the object initiated above.
[SUP]*[/SUP]I'd say "finally object-oriented", but as the mysqli extension is nearing its tenth birthday, that hardly seems logical or fair to PHP...
Where my form currently stands is it submits the request and will change any value in the boatname field, but will not update the brokername field.
It appears to me via casual inspection that this line:
<option value="<?php echo $row[brokername]; ?>" <?php if ($row[brokername] == $brokerlistrow[id]) { echo selected; } ?> ><?php echo $brokerlistrow[name]; ?></option>
Will not product HTML source with a
name='brokername'
attribute; this would be a possible explanation for your problem.