Jump to content

richiec

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Everything posted by richiec

  1. still dont get it though, all i want it to do is show a different page just putting the ?page= in the link doesnt change it to the page which the page= if you see what i mean it just shows the original page
  2. alot of php sites in there url have something like www.whatever.com/site.php?page=hello ive always wonderd how to do that, im sure its pretty simple.. im asking because i just wana keep the main page the same name and have different site.php?= so like www.whatever.com/site.php?page=hello and then www.whatever.com/site.php?page=goodbye
  3. YES!!! that worked mate, thank you very much, all of you who helped me here! Enjoy the rest of your day/night much love :x Rich.
  4. Still not working, it still just displays "members test" when i login to an account which should say "admin test" Any more ideas? ???
  5. Sorry to reopen this, but i still cant get it, ive changed it to the if/else command insted of the switch command but still cant get it. I have just set it to do something simple once i get it to work i can put it all back into place with the right layouts for admin/members ect this is what i have.. $nick = $_SESSION["myusername2"]; $query="SELECT `access` FROM `user` WHERE `username` = '$nick'"; $result=mysql_query($query) or die(mysql_error()); $num = mysql_num_rows($result); $isAdmin = ($result['access'] == "admin"); if ($isAdmin) echo "admin test"; else echo "members test"; Now i have loged in as someone with admin and someone with member as there access but on both it echos "members test" it doesnt echo "admin test" on the admin user. Any ideas?
  6. Now i just get a blank page but atleast it gives me no errors which probably just means its a html layout error or something so i should be able to figure it out. Thanks alot for all your help! Enjoy the rest of your day/night Rich.
  7. i tried both of those, and both return with the "hmm" error from $query any idea why? Thanks though and the switch seems like a good idea if i can get it to work.
  8. Hey people, what i am trying to do is just make a very simple user access level. Ill explain as much as i can for you to understand. In mysql db i have a simple table for users, with 4 fields; 1) id 2) username 3) password 4) access My login system works fine that isnt a problem, now in the access field what i am trying to do is in there either have "admin" or "member" depending on the user. The reason behind this is so in the php members area it echos different things depending on that users access (admin or member in the access field) something like this... <? $nick = $_SESSION["myusername2"]; $query="SELECT * FROM `user` WHERE 'username' = $nick"; $result=mysql_query($query) or die(hmm); $num = mysql_num_rows($result); if (mysql_result($result,$i,"access") == 'admin'){ echo "<admin user page>"; } elseif (mysql_result($result,$i,"access") == 'members'){ echo "<members user page>"; } ?> any ideas? Thanks
  9. Thank you, works perfectly now. Thanks again Rich.
  10. yeah i didnt on the logout.php thanks. i tried that and it does log me out now so thanks for that. However it does log me out but it gives me this error Line 44 is session_start(); any ideas?
  11. Hey there, i have the login all set up and im trying to add a logout option however its not working lol this is what i have //registers session on login session_register("myusername"); session_register("mypassword"); now on logout.php i would have thought it would be something like... <? session_unregister("myusername"); session_unregister("mypassword"); echo "you are now loged out." ?> It echos the "you are now loged out." but it doesnt actualy log you out. Any ideas of what im doing wrong?
  12. i have curl uploaded now on my site but i cant get my head around how to install it to work with my php site. Can anyone help?
  13. sigh... So curl is the only way to do it? because it seems like a lot just to login to a site
  14. Hey people, i am a little stuck ill try and explain it best i can. What i am trying to do is parse some information from a site (easy enough) however i need to be loged in to the site to get that information and i have no idea how to do that. Could someone give me an example please? http://sigil.outwar.com login_username=username login_password=password Once loged in i then need to go to another page which can just be linked to once loged in. Any ideas? Thanks Rich.
  15. im a total js noob lol but thanks for the reply ill see if i can get something working from it. Rich
  16. Hey guys http://fearedwarlords.dks-gfx.com/timeframe/index.php If you go there you will see a bunch of images with hover overs of wether or not each one is due or not. What i would like to do is when updating it to put a "kill time" when it was last killed, and then put a "due time" where you put in the hours and minuets untill it is due again. Once updated for it to start the count down timer for the one i just updated. Right now it pulls the times from the db then just use variables for it to display the times they are due. Any ideas on how i can get it to be a count down timer insted? Something like "last killed at <time> on the <date>" then the count down timer below it like "due in x hours x mins"
  17. fixed it, thanks anyway.
  18. Thats just it though, it all echos from mysql db and before i added the if/else command for the gems the table worked fine it only pulls the table info once from the php code which i pasted and it puts each one into a new line.. i know it works because it displays the first item corectly its just suposed to display the others under it insted of outside the table..
  19. Hey first of it started as a php question, but once that was solved it then became a html problem so i thought it best to close that thread on php help and make a new one here for the new problem. the table code bellow worked fine untill i added an if/else code into it.. since i added that the table now breaks after the first item. you will see what i mean here http://fearedwarlords.dks-gfx.com/items/items.php the code is: if ($_REQUEST["gem"] != NULL){ $i++; echo " <tbody><tr> <td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td> </tr> <tr> <td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\"> <br> $hitpoints2 Hit points<br>$attack2 Attack<br>$rage2 Rage per turn<br>$maxrage2 Max Rage<br>$exp2 Experience per turn <br>$rampage2 % Rampage<br>$critical % Critical hit<br>$block % Block <br><br> </td> <td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\"> <img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_green.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_blue.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_red.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_white.jpg\"><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td> </tr> </tbody></table></td></tr></tbody></table></center></div>"; } else { $i++; echo " <tbody><tr> <td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td> </tr> <tr> <td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\"> <br> $hitpoints Hit points<br>$attack Attack<br>$rage Rage per turn<br>$maxrage Max Rage<br>$exp Experience per turn <br>$rampage % Rampage<br>$critical % Critical hit<br>$block % Block <br><br> </td> <td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\"> <img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td> </tr> </tbody></table></td></tr></tbody></table></center></div>"; Any ideas why it breaks the table after the first item?
  20. it worked fine before i added the if.. else.. into it.. can you only have one echo using the if, else command? This is the echo code... if ($_REQUEST["gem"] != NULL){ //echos the gemmed stats// $i++; echo " <tbody><tr> <td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td> </tr> <tr> <td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\"> <br> $hitpoints2 Hit points<br>$attack2 Attack<br>$rage2 Rage per turn<br>$maxrage2 Max Rage<br>$exp2 Experience per turn <br>$rampage % Rampage<br>$critical % Critical hit<br>$block % Block <br><br> </td> <td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\"> <img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_green.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_blue.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_red.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gem_white.jpg\"><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td> </tr> "; echo '</tbody></table></td></tr></tbody></table></center></div>'; } else { //echos the ungemmed stats// $i++; echo " <tbody><tr> <td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td> </tr> <tr> <td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\"> <br> $hitpoints Hit points<br>$attack Attack<br>$rage Rage per turn<br>$maxrage Max Rage<br>$exp Experience per turn <br>$rampage % Rampage<br>$critical % Critical hit<br>$block % Block <br><br> </td> <td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\"> <img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td> </tr> "; echo '</tbody></table></td></tr></tbody></table></center></div>';
  21. ok i got that working, kind of it doesnt work out the % + for the gems right but i can mess with that once i get it fully working.. However the other thing wrong with it now, is that after it gets the info for the first item it breaks the table and displays all of the others outside of the table http://fearedwarlords.dks-gfx.com/items/items.php if you look there you will see what i mean, any ideas?
  22. where would i put it, because if i put it before i echo it all, it displays no items (both before and after pressing the gem button) and if i put it after it echos it all, it doesnt display any changes after pressing
  23. Hey guys and girls, im stuck and could use a little help.. if you go here you will see a list of items: http://fearedwarlords.dks-gfx.com/items/items.php What i would like to do is at the top where it has the button "gem" when clicked it changes the stats of all the items to a set % + Heres the code i have right now: //gets the info from db// $stock = mysql_result($result,$i,"stock"); $name = mysql_result($result,$i,"name"); $hitpoints=mysql_result($result,$i,"hitpoints"); $attack=mysql_result($result,$i,"attack"); $rage=mysql_result($result,$i,"rage"); $maxrage=mysql_result($result,$i,"maxrage"); $exp=mysql_result($result,$i,"exp"); $critical=mysql_result($result,$i,"critical"); $rampage=mysql_result($result,$i,"rampage"); $block=mysql_result($result,$i,"block"); $image=mysql_result($result,$i,"image"); //echos them all// echo " <tbody><tr> <td colspan=\"2\" style=\"font-weight: bold; height: 20px; font-size: 10pt; color: rgb(204, 204, 204);\" align=\"left\">$name x $stock</td> </tr> <tr> <td style=\"padding: 2px; font-family: Verdana; font-weight: bold; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"left\" valign=\"top\"> <br> $hitpoints Hit points<br>$attack Attack<br>$rage Rage per turn<br>$maxrage Max Rage<br>$exp Experience per turn <br>$rampage % Rampage<br>$critical % Critical hit<br>$block % Block <br><br> </td> <td style=\"width: 80px; font-family: Verdana; font-size: 7pt; color: rgb(255, 255, 255);\" align=\"center\" valign=\"top\"> <img src=\"$image\" style=\"border: 1px solid rgb(102, 102, 102); margin: 2px;\"></a><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"> <img src=\"http://fearedwarlords.dks-gfx.com/images/gemslot.jpg\"><br> <img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><img src=\"http://fearedwarlords.dks-gfx.com/images/augslot.jpg\"><br></td> </tr> "; What i was thinking was something like... /// if ($_REQUEST["Submit"] != NULL){ //// $hitpoints = ($hitpoints * 74%); $attack = ($attack * 92%); $rage = ($rage * 75%); $exp = ($exp * 75%); $maxrage = ($maxrage * 74%); $rampage = ($rampage * 83%); I know thats not right, and im abit of a noobie but any ideas on how i could do what im wanting to do?
  24. thanks, that was simple cant believe i didnt figure it out but thanks :x
×
×
  • 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.