Jump to content

[SOLVED] Not updating


topflight

Recommended Posts

This is the problem I am having I posted in another forum but it doesn't seem like it was active so here is the problem please help thanks in advanced.

 

This code I have is suppose to check the member list in the hub field and assign the new member a login id depending on what their hub is +1 well it works for all the other hubs but when the user selects the KSEA then it assigns it a KPDX hub id please help. This is my code:

 

<?php
$plist = mysql_query("SELECT * FROM `members` WHERE hub='$_POST[hub]' ORDER BY login DESC LIMIT 1") or die(mysql_error());
$plrows = mysql_num_rows($plist);
if ($plrows=="0"){ 
if ($_POST[hub]=="KSEA"){ $login = "1000"; }
if ($_POST[hub]=="KLAX"){ $login = "2000"; }
if ($_POST[hub]=="KPDX"){ $login = "3000"; }
if ($_POST[hub]=="PANC"){ $login = "4000"; }} else {

while($plr = mysql_fetch_array($plist)){ $login = $plr[login]; } $login = $login + 1; }
?>

 

Also this is the part of the form that contains the hub part.

 

     

      <select name="hub">
              <option>- SELECT A HUB -</option>
              <option value="KPDX">Portland</option>
              <option value="KSEA">Seattle</option>
              <option value="KLAX">Los Angeles</option>
              <option value="PANC">Anchorage</option>
            </select>

 

thanks in advanced!

Link to comment
https://forums.phpfreaks.com/topic/153079-solved-not-updating/
Share on other sites

run the query

SELECT login FROM `members` WHERE hub='KSEA' ORDER BY login DESC LIMIT 1

if its 3000+ then

 

review all that hub to find the point it messed up..

SELECT login FROM `members` WHERE hub='KSEA' ORDER BY login DESC

 

if they are all 3000 then just update them with +1000

Link to comment
https://forums.phpfreaks.com/topic/153079-solved-not-updating/#findComment-804060
Share on other sites

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.