Jump to content

karimali831

Members
  • Posts

    436
  • Joined

  • Last visited

Everything posted by karimali831

  1. Yh I noticed that, now I am getting this all over the page (repeating) clans&action=clanregister&cupID=24&clanID=325.$uri.">Team -X1-clans&action=clanregister&cupID=24&clanID=353.$uri.">fabricclans&action=clanregister&cupID=23&clanID=325.$uri.">Team -X1-clans&action=clanregister&cupID=23&clanID=353.$uri.">fabricclans&action=clanregister&cupID=22&clanID=325.$uri.">Team -X1-clans&action=clanregister&cupID=22&clanID=353.$uri.">fabricclans&action=clanregister&cupID=21&clanID=325.$uri.">Team -X1-clans&action=clanregister&cupID=21&clanID=353.$uri.">fabricclans&action=clanregister&cupID=20&clanID=325.$uri.">Team -X1-clans&action=clanregister&cupID=20&clanID=353.$uri.">fabricclans&action=clanregister&cupID=19&clanID=325.$uri.">Team -X1-clans&action=clanr I need it to printe decode it on value = <option value="'.$uri.'"> any ideas?
  2. OK, I did this with no luck $uri = 'clans%26action%3Dclanregister%26&cupID%3D'.$dl['ID'].'%26clanID%3D'.$dm['clanID'].''; print urldecode($uri); $clan .= '<option value="'.$uri.'">'.getclanname($dm['clanID']).'</option>';
  3. Can you show me how I can do this please? Never used it before.
  4. <option value="clans&action=clanregister&clanID='.$dm['clanID'].'">'.getclanname($dm['clanID']).'</option> Browser output: clans%26action%3Dclanregister%26clanID%3D325 any ideas? :confused:
  5. I've also tried: <form action="index.php?"><select name="site"> <option value="clans&action=clanregister&cupID='.$dl['ID'].'&clanID='.$dm['clanID'].'"> Output: index.php?site=clans%26action%3Dclanregister%26cupID%3D23%26clanID%3D325 :S %26 = "&" %3D = "="
  6. Thanks but everytime I use <select name="clan"> it will end up like this: index.php?site=clans?clan=325 And I need it like this index.php?site=clans&clan=325 for it to work. and I need the select name for it to select the correct one.
  7. $result = safe_query("SELECT * FROM ".PREFIX."cup_clan_members WHERE userID = '".$userID."' AND function = 'Leader'"); $clan = '<option value="0" selected="selected"> - '.$_language->module['choose_team'].' - </option>'; while($dm=mysql_fetch_array($result)) { $clan .= '<option value="'.$dm['clanID'].'">'.getclanname($dm['clanID']).'</option>'; $clanID = $dm['clanID']; } <form method="get" action="clans&action=clanregister&cupID='.$dl['ID'].'"><select name="clanID">'.$clan.'</select><input type="submit" value="Go"></form> Output: clans&action=clanregister&cupID=<ID>?clanID=<ID> Needed output: clans&action=clanregister&cupID=<ID>&clanID=<ID> I get correct outputs for both IDs also. I tried: <form method="get" action="clans&action=clanregister&cupID='.$dl['ID'].'&clanID='.$clanID.'"><select>'.$clan.'</select><input type="submit" value="Go"></form> but it doesn't select correct clanID from dropdown. anyone can help please?
  8. $leadercheck = safe_query("SELECT * FROM ".PREFIX."cup_clan_members WHERE userID = '$userID' AND function = 'Leader'"); if(mysql_num_rows($leadercheck) > 2) $user_menu .='<td bgcolor="'.$bg1.'" width="5%" align="center"><a href="clans&action=clanleave&clanID='.$db['clanID'].'" onclick="return confirm(\'Are you sure you want to leave this team?\');"> <img border="0" src="images/error.png" width="16" height="16"></a></td>'; else if(mysql_num_rows($leadercheck)) Does if(mysql_num_rows($leadercheck) > 2) mean if 2 SQL rows or more? I need 2 or greater.
  9. Nice! I get the error now Notice: Undefined variable: members in /home/ficomedi/public_html/cup/languages/uk/clans.php on line 89 Notice: Undefined variable: ds in /home/ficomedi/public_html/cup/languages/uk/clans.php on line 89 Notice: Undefined variable: clanID in /home/ficomedi/public_html/cup/clans.php on line 340 I'm going through these errors now.
  10. Query does not succeed and I'm not sure how to enable display errors? Thanks for help
  11. }elseif(isset($_GET['action']) && $_GET['action'] == 'leadmember') { if(mysql_num_rows(safe_query("SELECT ID FROM ".PREFIX."cup_all_clans WHERE leader = '".$userID."' AND ID = '".$clanID."'"))){ safe_query("UPDATE FROM ".PREFIX."cup_clan_members SET function = 'Leader' WHERE userID = '".$_GET['memberID']."' && clanID = '".$_GET['clanID']."'"); redirect('clans&action=clanedit&clanID='.$_GET['clanID'], $_language->module['member_edited'], 2); } When I try and set function for userID, page breaks. (no errors) clans&action=leadmember&clanID=325&memberID=325 The IDs are correct.. any ideas what's wrong? Thanks for any help.
  12. Hi, I'm using this pagination script at http://www.phpfreaks.com/tutorial/basic-pagination and works great. I want to add a search to it and sort by ASC and DESC. Here is what I added in between //Search and //End search: // if not on last page, show forward and last page links if ($currentpage != $totalpages) { // get next page $nextpage = $currentpage + 1; // echo forward link for next page echo " <a href='clans&currentpage=$nextpage'>></a> "; // echo forward link for lastpage echo " <a href='clans&currentpage=$totalpages'>>></a> "; } // end if /****** end build pagination links ******/ //Search $search = $_POST['search'] ? $_POST['search'] : $_GET['search']; $type = $_GET['type']; $sort = $_GET['sort']; if(!isset($sort)) $sort="ID"; if(!isset($type)) $type = "ASC"; if($search) $ergebnis = safe_query("SELECT status, ID, name FROM ".PREFIX."cup_all_clans WHERE name LIKE '%$search%' ORDER BY $sort $type"); else $ergebnis = safe_query("SELECT status, ID, name FROM ".PREFIX."cup_all_clans ORDER BY $sort $type"); $anz=mysql_num_rows($ergebnis); if($anz) { if($type=="ASC") $sorter='<a href="clans&sort='.$sort.'&type=DESC&search='.$search.'">Sort:</a> <img src="../images/icons/asc.gif" width="9" height="7" border="0"> '; else $sorter='<a href="clans&sort='.$sort.'&type=ASC&search='.$search.'">Sort:</a> <img src="../images/icons/desc.gif" width="9" height="7" border="0"> '; echo '<form method="post" action="clans&sort='.$sort.'&type='.$type.'">'.$sorter.' Teamname: <input type="text" name="search" size="15" class="form_off" onFocus="this.className=\'form_on\'" onBlur="this.className=\'form_off\'"> <input type="submit" value="Go"></form>'; if($search) echo '<p>'.$anz.' Clan(s) found</p>'; echo'<form method="post" name="ws_cups" action="index.php?site=clans"><table width="100%" cellpadding="4" cellspacing="1" bgcolor="#999999"> <tr bgcolor="#CCCCCC"> <td class="title" align="left"><a class="titlelink" href="clans&sort=name&type='.$type.'&search='.$search.'">Teams:</a></td></form>'; } //End Search // while there are rows to be fetched... while($ds=mysql_fetch_assoc($result)) { I'm getting correct output of "clans found" but not the correct teams showing. It's just using page1, 2, 3 still when I use search. I know above is incorrect. Someone please fix? Thanks for any help.
  13. anyone help me please with adding this check?
  14. if userID is in clanID (table cup_clan_members) and clanID is in cupID (table cup_clans) and the same userID is in a different clanID (table cup_clan_members), that clanID can not signup to cupID (table cup_clans) someone tell me a better expression please because according to an expert, it's wrong and I don't see nothing wrong with my table structure. Take a look at attatchments. [attachment deleted by admin]
  15. What's the difference? My CMS developer says it's better to use safe_query but I don't know the difference.
  16. For some reason it works now. Perhaps cache, thanks anyway.
  17. Hi, Can someone tell me how I can fix this please. I get can not connect to SQL server. I'm using pagination -> http://www.phpfreaks.com/tutorial/basic-pagination and works fine when I manually input the database information. E.g: // database connection info $conn = mysql_connect('localhost','user','password') or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('database',$conn) or trigger_error("SQL", E_USER_ERROR); -> is fine. But I need to use it like this: // database connection info include("_mysql.php"); $conn = mysql_connect($host, $user, $pwd) or system_error('ERROR: Can not connect to MySQL-Server'); $db = mysql_select_db($db, $conn) or trigger_error("SQL", E_USER_ERROR); and the _mysql.php file is like: <?php $host = "localhost"; $user = "user"; $pwd = "password"; $db = "database"; define("PREFIX", 'ficocup_'); ?> I'm sure that's correct. Anyone help me please? Thank you
  18. Now how didn't I spot that.. ok but now this: error=Table 'ficomedi_ficomedia.cups' doesn't exist It should be ficomedia_cups, reading prefix twice? I remove PREFIX and I get error=Table 'ficomedi_ficomedia.cup_all_clans' doesn't exist I don't understand how it reads the prefix twice, followed by a dot?
  19. Is the query correct or is there something wrong on my side?
  20. Thanks for that but I get an SQL error. $ergebnis = safe_query("select ca.status, ca.ID, ca.name from".PREFIX."cup_all_clans ca,cups c WHERE ca.ID = c.ID and c.ID=$cupID"); and error: # errorno=1064 # error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ca,cups c WHERE ca.ID = c.ID and c.ID=4' at line 1 # query=select ca.status, ca.ID, ca.name fromficocup_cup_all_clans ca,cups c WHERE ca.ID = c.ID and c.ID=4 It reads the correct ID from the correct table any ideas?
  21. Like this? First attatch is from cups table and second from cup_all_clans [attachment deleted by admin]
  22. Hi, E.g. $ergebnis = safe_query("SELECT status, ID, name FROM ".PREFIX."cup_all_clans WHERE ID= (from table cups)); How can I do this?
×
×
  • 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.