Jump to content

I WanT To Code PHP

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

I WanT To Code PHP's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I have this piece of code it it currently only updates the last value in the databse. I need all of the fields to update there value. Can anyone help me out ? <fieldset> <legend>Ticket Categorys</legend> <form method='post' action='admin.php?do=ticketCats'> <table width='100%' style='background: #dddddd; padding:2px;'> <tr style='background: #C4C4C4;'> <td style='font-weight: bold;'><center>ID</center></td> <td style='font-weight: bold;'>Category</td> <td style='font-weight: bold;'><center>Action</center></td> </tr> <? $color="1"; $query = mysql_query(" SELECT * FROM ticket_cats ORDER BY name ASC "); $level2 = array(); while ($row = mysql_fetch_assoc($query)) { $level2[] = array('id'=>$row['id'],'name'=>$row['name']); if($color==1) { ?> <tr style='background: #fff;'> <? $color="2"; } else { // Set $color back to 1 $color="1"; } ?> <td style='width:15px;'><input type='hidden' value='<?echo $id;?>' name='id[]'><center><?echo $id;?></center></td> <td><input type='text' name='catname' style='width:400px;' value='<?echo $name;?>'/></td> <td><center><input type='submit' name='deleteCat' value='Delete ID:(<?echo $id;?>)' /></center></td> </tr> <? } ?> <tr> <td> <input type='submit' name='updateAllCats' value='Update Categorys' /> </td> </tr> </table> </form> </fieldset> <? if(!empty($_POST['updateAllCats'])) { $catname = $_POST['catname']; $ida = $_POST['id']; mysql_query("UPDATE ticket_cats SET name='$catname' WHERE id='$ida'"); } ?>
  2. Thanks now its in the right forum... any php guys know,,,>
  3. Whoops sorry guys can u delete these post and move to php hlpe... sorry."
  4. Im pazzled, Im pretty new with php. I said id post this sanario here and see if any php freaks can help me out..! Im currentaly coding a gaming website. The scrip is based off vBulletin. I have the admin cp working fine and i can access that fine. But here the thing, i coded an "arenacp" which is a fully custom cp for staff do deal with issues like game rules and user tiskets. Thats all coded and working fine. BUT...... I dont have access, when i sign in i have no permissions, and the only way to give permissions in the cp is by being an administrator of the cp. So what i am saying is noone has access to the cp so noone can give out access..! Its hard to explain but i hope you undersrtand. I need to code it i think in the index of /arenacp so that my userid "1" have full permissions.... Anyone know what i can do please help.,.!!!!!!
  5. I was missing challenged in my table... can anyone tell fropm this code what lines i need in the table challanged.... Like for example challangerid varchar 225 $oldreports=mysql_query("SELECT matchid,challenger,challenged FROM matches WHERE status='Waiting for Scores'"); while(list($matchid,$challenger,$challenged)=mysql_fetch_row($oldreports)){ $getreport=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenger' AND matchid='$matchid'"); $getreport=mysql_fetch_array($getreport); $getreport2=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenged' AND matchid='$matchid'"); $getreport2=mysql_fetch_array($getreport2); if($getreport[reportid] AND !$getreport2[reportid]){ $_updated = strtotime($getreport[reported]); $time = time(); $diff = $time - $_updated; $diff = $diff - '60'; if ($diff > 14400){ $getwinner=mysql_query("SELECT * FROM team WHERE teamid='$challenger'"); $getwinner=mysql_fetch_array($getwinner); $getloser=mysql_query("SELECT * FROM team WHERE teamid='$challenged'"); $getloser=mysql_fetch_array($getloser);
  6. OK thanks for quick reply, now i get his error on the homepage.. Unknown column 'challenger' in 'field list'
  7. Why am i getting this error and how can i fix it please help..!! Here are lines 702 and on.... $oldreports=mysql_query("SELECT matchid,challenger,challenged FROM matches WHERE status='Waiting for Scores'"); while(list($matchid,$challenger,$challenged)=mysql_fetch_row($oldreports)){ $getreport=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenger' AND matchid='$matchid'"); $getreport=mysql_fetch_array($getreport); $getreport2=mysql_query("SELECT * FROM match_reports WHERE reporter='$challenged' AND matchid='$matchid'"); $getreport2=mysql_fetch_array($getreport2);
  8. I have no idea..? Im new to coding and i never seen this error before...
  9. Im getting this error in my arena control panel : Fatal error: Call to undefined function staff_permissions() in /home/battleco/public_html/arenacp/index.php on line 579 Here are the lines in the file arenacp/index.php: // ************************************************* $canjob = false; if(staff_permissions("job","view_applications")){ $canjob = true; construct_nav_option("Open Applications", 'openapplication.php'); $canjob = true; construct_nav_option("Applications", 'application.php'); } if(staff_permissions("job","manage_application_questions")){ $canjob = true; construct_nav_option("Application Questions", 'appquestions.php'); } if(staff_permissions("job","manage_application_requirements")){ $canjob = true; construct_nav_option("Application Requirements", 'apprequirements.php'); } if(staff_permissions("job","manage_interview_questions")){ $canjob = true; construct_nav_option("Interview Questions", 'interview_questions.php'); } if(staff_permissions("job","manage_audit_questions")){ $canjob = true; construct_nav_option("Audit Questions", 'audit.php'); } if(staff_permissions("job","add_dnh_list") OR staff_permissions("job","edit_dnh_list")){ $canjob = true; construct_nav_option("Do Not Hire List", 'dnhlist.php'); } if(staff_permissions("job","manage_positions_available")){ $canjob = true; construct_nav_option("Positions Available", 'positions.php'); } if(staff_permissions("job","user_records")){ $canjob = true; construct_nav_option("User Records", 'user_records.php'); } if(staff_permissions("job","add_audit")){ $canjob = true; construct_nav_option("Add Audit", 'add_audit.php?do=addaudit1'); } if(staff_permissions("job","edit_audit")){ $canjob = true; construct_nav_option("Edit Audit", 'edit_audit.php?do=editaudit1'); } if(staff_permissions("job","audit_log")){ $canjob = true; construct_nav_option("Audit Log", 'audit_log.php'); } if(staff_permissions("job","psa")){ $canjob = true; construct_nav_option("Pending Staff Actions", 'psa.php'); } and so on...............
  10. Come on guys, someone please contact me lol....
  11. Hi im need help with this vbulletin, I made a custom cp, put i have put two logins on it my mistake... The first one i need to remove, its a pop-up login. I only want the second one which is the forums username and password login. Please tell me what to remove... im not sure if this is even the right file in the admin cp folder to remove the pass request... The code is too long to post here, somone please please contact me.! MSN = danhayden06@hotmail.com Skype = danhayden06
×
×
  • 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.