Jump to content

scorpiious

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

scorpiious's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok well i have this script. //Upload the file $target_path = $folder_quests; $target_path = $target_path . $number ; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The quest $Quest has been uploaded and given id $number"; } else{ echo "There was an error uploading the quest, please try again!"; } //Done } } how can i make sure that the uploaded file is a text file..?
  2. can someone please tell me how i can do this? i have this code to insert into my db mysql_query("INSERT INTO userdata (username, combat, overall, rank, xp, attack, defence, strength, hp, ranged, prayer, magic, cooking, woodcutting, fletching, fishing, firemaking, `crafting`, smithing, mining, herblore, agility, theiving, slayer, farming, runecraft, hunter, construction) VALUES ('$_GET[user]', '".$cblevel[0]."', '".parselvl(Overall)."', '".parserank(Overall)."', '".parsexp(Overall)."', '".parselvl(Attack)."', '".parselvl(Defence)."', '".parselvl(Strength)."', '".parselvl(Hitpoints)."', '".parselvl(Ranged)."', '".parselvl(Prayer)."', '".parselvl(Magic)."', '".parselvl(Cooking)."', '".parselvl(Woodcutting)."', '".parselvl(Fletching)."', '".parselvl(Fishing)."', '".parselvl(Firemaking)."', '".parselvl(Crafting)."', '".parselvl(Smithing)."', '".parselvl(Mining)."', '".parselvl(Herblore)."', '".parselvl(Agility)."', '".parselvl(Thieving)."', '".parselvl(Slayer)."', '".parselvl(Farming)."', '".parselvl(Runecraft)."', '".parselvl(Hunter)."', '".parselvl(Construction)."')"); but if the user already exists it'll just create the same username over again except with different values.. how can i get it so if the username exists it just overwrites the stats?
  3. nvm stupid mistake, i didnt add [0]
  4. ok well, i tried the .'s and it worked but the calculation doesnt work, look i have this code to calculate the cblevel $cblevelraw = ("0.32707" * parselvl(Attack)) + ("0.249" * parselvl(Defence)) + ("0.324" * parselvl(Strength)) + ("0.25" * parselvl(Hitpoints)) + ("0.124" * parselvl(Prayer)); $cblevel = explode(".",$cblevelraw); why does it show up in the database as arr?
  5. what about $cblevel? thats a string too any its not working
  6. can someone tell me how to properly fix this? i dont know how to add strings or functions inside the query.. mysql_query("INSERT INTO userdata (ID, username, combat, overall, rank, xp, attack, defence, strength, hp, ranged, prayer, magic, cooking, woodcutting, fletching, fishing, firemaking, `crafting`, smithing, mining, herblore, agility, theiving, slayer, farming, runecraft, hunter, construction) VALUES ('NULL', '$_GET[user]', '$cblevel', 'parselvl(Overall)', 'parserank(Overall)', 'parsexp(Overall)', 'parselvl(Attack)', 'parselvl(Defence)', 'parselvl(Strength)', 'parselvl(Hitpoints)', 'parselvl(Ranged)', 'parselvl(Prayer)', 'parselvl(Magic)', 'parselvl(Cooking)', 'parselvl(Woodcutting)', 'parselvl(Fletching)', 'parselvl(Fishing)', 'parselvl(Firemaking)', 'parselvl(Crafting)', 'parselvl(Smithing)', 'parselvl(Mining)', 'parselvl(Herblore)', 'parselvl(Agility)', 'parselvl(Thieving)', 'parselvl(Slayer)', 'parselvl(Farming)', 'parselvl(Runecraft)', 'parselvl(Hunter)', 'parselvl(Construction)')"); the parts where it says parselvl are actually functions, how would i tell sql that?
  7. well im not the best at php so i gotta ask some questions, i was making a dynamic signature application and im wondering how would you take the data off of another page and split it up? so far i have $name = $_GET["user"]; $string = fopen("http://hiscore-web.runescape.com/aff/runescape/hiscorepersonal.cgi?username=".$name,"r"); where should i go from here?
×
×
  • 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.