Jump to content

doublea2k7

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by doublea2k7

  1. thanks for the reply PaulRyan. I've tried your code but all the rows have the same class even the last one.
  2. thers a syntax error here is a snipet of my code. Its something wrong with the endwhilte but i dont know wat is it. <?php $row2 = mysql_fetch_array($result); while($row = mysql_fetch_array($result)){ ?> <tr id="<?php echo $row['statusid']?>" class="status"> <td><?php echo $row['date']?></td> <td id="<?php echo$row['statusid']?>" style="text-align:left;" class="editStatus"> <?php echo htmlspecialchars($row['statusTxt'], ENT_QUOTES)?></td> <td style="width:1%;"> <form action=""> <input type="image" src="img/cancel.png" onclick="makeVariable('<?php echo $row['statusid']?>')" class="deleteRowButton"/> </form> </td> </tr> <?php $row2 = $row;?> <?php } end while?> <tr id="<?php echo $row['statusid']?>" class="statusLast"> <td><?php echo $row['date']?></td> <td id="<?php echo$row['statusid']?>" style="text-align:left;" class="editStatus"> <?php echo htmlspecialchars($row['statusTxt'], ENT_QUOTES)?></td> <td style="width:1%;"> <form action=""> <input type="image" src="img/cancel.png" onclick="makeVariable('<?php echo $row['statusid']?>')" class="deleteRowButton"/> </form> </td> </tr> <?php } ?>
  3. Im not sure where to post this but since it includes php il post it here instead of in the mysql forum. ok so, i have a table and i get the values using while($row = mysql_fetch_array($result)){ and then echo them in rows. that works fine but i need to add a class to the last row of my table. I would need somehow to fetch the last row of the array and make it echo something different. Any help is appreciated Thank you
  4. Current Mysql Version I have a table that holds user account info. I have another table that holds status updates according to their account "id" in the clients table. Example |Table clients| id Name Last Name 1 Fred John 2 Frank Joe |Table Status| id status clientId 0 In Progress 1 1 Still In Progress 1 I want to be able to select all accounts with no entries in the status table. Here is what I have but its not working. SELECT id, name FROM clients as u INNER JOIN ( SELECT clientId, COUNT(*) AS statusCount FROM status HAVING statusCount > '0' ) AS statusSubQuery ON (statusSubQuery.clientId = u.id) ";
  5. I have a table that holds user account info. I have another table that holds status updates according to their account "id" in the account table. Example |Table account| id Name Last Name 1 Fred John 2 Frank Joe |Table Status| id status accountid 0 In Progress 1 How can would i select all the account ids that don't have any entries in the status table. So for the example above how would i select the account Frank Joe with id 2 as i has no status linked to it.
  6. i have a table called accounts inside there is ID NAMe password now users dont know their id so they would have to enter their name. So this code [code]if ($query=mysql_query("update accounts set loggedin='1' WHERE name='$name'")) { echo "Your account has been fix try to log in the game now!"; but this works because it finds the id which is the primayr index ($query=mysql_query("update accounts set loggedin='1' WHERE id='$id'")) { echo "Your account has been fix try to log in the game now!";[/code] but the user doesn know their id how could i get the name and then get the id so the update will work.
  7. they r on cause if a remove a bracket i get a syntax error ? what could be the problem
  8. i try $query = "update accounts set loggedin='2' where name=$name"; echo $query; mysql_query($query) or die(mysql_error()); i get the same thing just a blank page like i did before
  9. why isn't my echo showing and my database updating <? include "config2.php"; ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> </head> <body> <? $name=mysql_real_escape_string($name); if ($rec=mysql_fetch_array(mysql_query("SELECT name FROM accounts WHERE name='$name'"))) { if (($rec['name']==$name)) { if(mysql_query("update accounts set loggedin='2' WHERE name='$name'")){ echo "<font face='Verdana' size='12' ><center>OK <br> Your account has been fix try to log in the game now!</font></center>"; } } } ?> </body> </html>
  10. o ty but now i have another problem my message in echo does not display as well as the database field loggedin does not change to 1
  11. can anyone tell me whats wrong with this script i get this error Parse error: syntax error, unexpected $end in /home/urzone/public_html/smashlegacies.exofire.net/loginfix_check.php on line 28 <? include "config2.php"; ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <? $name=mysql_real_escape_string($name); if($rec=mysql_fetch_array(mysql_query("SELECT * FROM accounts WHERE name='$name'"))){ if(($rec['name']==$name)){ if(mysql_query("update accounts set loggedin='1' WHERE name='$name'")){ echo "<font face='Verdana' size='2' ><center>OK <br> Your account has been fix try to log in the game now!</font></center>";}} ?> </body> </html> im really new at php coding so please help
  12. hi im new to the forum and i need help how would i check if a user name doesn't exist i know how to check if user name exits if(mysql_num_rows(mysql_query("SELECT userid FROM plus_signup WHERE userid = '$userid'") but i don't know how to check if it doesn't exits. plz help
×
×
  • 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.