Jump to content

burtybob

Members
  • Posts

    105
  • Joined

  • Last visited

Everything posted by burtybob

  1. You are right it is more complicated and also it needs to be installed on the host server which would mean i would either: A) Find a host which had a subversion or similar system installed OR B) Host from my computer which means haveing the system on all the time, neither of these really appeal to me also I was thinking that if i can make a File Manager that i would be able incorperate it in my site much easier....
  2. Hello PHPfreaks again So glad to be back in another great community Here is my question does anyone know how I would go about making a file manager in php? I just need basics like how to open the file in an editable way? Also i know this is possible as webftp does it and so does awardspace and infact most web hosts have some sort of PHP file manager that they use for their users. I use things like Dreamweaver and COULD use the webftp however this would mean that should i wish to have more coders from the game i would have to give them the password to the WHOLE of my web site business. This proves a problem as it gives access to the database and scripts for every site i run and this causes a serious security problem and also this way i can add and remove users to this list and they use their allready existing password and user account and i need to edit just the "access" file to the file manager I'd like to set up. Thanks for your help, Burtybob.
  3. ok i tried that but that didnt work and it just brought up a blank page (errors are on) and when i went back to the with quotes and commas blank page??? still no idea as have tried it on localhost to the same problem as well as my webhost
  4. $num=mysql_query("SELECT * FROM members") or die (mysql_error()); $num=mysql_num_rows($num) or die (mysql_error()); $useridabc=0; while ($num>$useridabc) { $money="90,000,000"; $sql=mysql_query("SELECT * FROM members WHERE `userid`='$useridabc' AND `money`>'$money'") or die (mysql_error()); $sql=mysql_fetch_array($sql) or die(mysql_error()); $moneyaftertax=$sql[money]; $moneyaftertax=($moneyaftertax*0.99); $sql2=mysql_query("UPDATE members SET `money`='$moneyaftertax' WHERE `userid`='$useridabc'"); $useridabc++; Ok as far as i got is it either takes ALL the money or else it does the *0.99 all the time for all users even if they have less than 9mill. I know that the $money is currently set to 90mill this is because i was testing to see if that made any difference however it did not i have tried all that i can think if so now i have come to the best place for php help Thanks in advance burtybob
  5. I have never heard of a reverse md5 er!!! As btherl said it was designed to stay as md5 can i ask WHY you want one?
  6. OK i have seen that the wepondmg for some reason is terminating before going into the if statement hmm. echo "Wepondmg: $weapondmg<br>"; echo "Victims Health: $killquery<br>"; Shows up twice?? Which is also confusing but a different issue so im not worried about it but thought id mention it incase it is.
  7. Sorry i didnt quite make it clear, i need that return for the function its in dont it??? Ill try anyway:) Ok so i tried removing the return but same result as before execting the first one
  8. if ($weapondmg<=10) { return $victimnewhealth=$killquery+1000; }elseif ($weapondmg<=20) { return $victimnewhealth=$killquery*0.20; }elseif ($weapondmg<=30) { return $victimnewhealth=$killquery*0.50; }elseif ($weapondmg<=40) { return $victimnewhealth=$killquery*0.50; }elseif ($weapondmg>=40) { return $victimnewhealth=$killquery*0.50; } Ok as i understand the above code will co through untill one of them validates as true BTW $weapondmg=somwhere between 40 AND 55 with mt_rand So therefore the last elseif should be the only one to be true however it executes the FIRST one?? Please can anyone see why this is?
  9. What about a basic form and code eg. if($_REQUEST[pass]!=USERSCHOSENPW && $_REQUEST[user]!=USERSCHOSENUSER){ die(); } else { //echo } ?> <html> <form action="" method=post> <input type=password name=pass> <input type=text name=user> <form> BTW i did leave the textbox without any labels any purpose as it increses security a pinch as a person wont know which is which although i wouldnt recomend that on a client side login.
  10. very true but for reading and debugging sense sometimes it is easier to use an extra variable and see what is happening but i will bear that in mind thank you ginger robot
  11. I am gussing that you are running this from your computer yeah? If you are not you can use webftp which is an online ftp basically if you are running it on your computer you could probably just google free ftp server download and install one and as far as i can see you could use it that way as well...
  12. you would need to do something like $sum=100 $suma=$sum*1.10; $sumb=$suma*1.07; Which SHOULD if the maths is working give you the $sumb value being 117.70, inside the phptags <?php $sum=100 $suma=$sum*1.10; $sumb=$suma*1.07; // This is the last part and the variable you will want to pass onto the processing form. $sql = "SELECT * FROM vendor WHERE id=$bidder"; $query = mysql_query($sql); echo "Bidder Number: " .$_GET[bidder]. "<br>"; while($row = mysql_fetch_array($query)) { echo "Name: " .$row['name']. "<br>"; echo "Address: " .$row['address1']. "<br>"; echo "City: " .$row['city']. "<br>"; echo "State: " .$row['province']. "<br>"; echo "Postal Code: " .$row['p_code']. "<br>"; echo "Country: " .$row['country']. "<br>"; } ?> <?php if ($_GET[method]==cc){ echo "<form method=\"GET\" action=\"cccapture.php\">"; } else if ($_GET[method]==check){ echo "<form method=\"GET\" action=\"checkcapture.php\">"; } else if ($_GET[method]==cash){ echo "<form method=\"GET\" action=\"cashdbupdate.php\">"; } ?> <?php $sql = "SELECT * FROM checkout WHERE bidnum=$bidder AND paid='no'"; $query = mysql_query($sql); $sum = array(); while($row = mysql_fetch_array($query)) { $sum[] = $row['amt']; $di = $row['id']; echo "Lot Number " .$row['lotnum']. ": $" .$row['amt']. "<br>"; } $sum = number_format(array_sum($sum),2); echo "<input type=\"hidden\" name=\"bidder_number\" value=\"$bidder\">"; echo "<input type=\"hidden\" name=\"idx\" value=\"$di\">"; echo "<input type=\"hidden\" name=\"amount\" value=\"$sum\">Total Due: " .$sum; ?> <br> </div> <div style="padding-left:185px;"> <?php if ($_GET[method]==cc){ echo "<input type=\"submit\" value=\"Process CC Payment\" name=\"submit\">"; } else if ($_GET[method]==check){ echo "<input type=\"submit\" value=\"Process Check Payment\" name=\"submit\">"; } else if ($_GET[method]==cash){ echo "<input type=\"submit\" value=\"Process Cash Payment\" name=\"submit\">"; } ?> </form> Please if anyone sees a problem feel free to correct but as far as i can see that is the quickest and simplest way.
  13. I read somewhere on this forum that some other people managed to use this way also it makes sense to me as im using one variable name instead of 4 different ones I tried with the quotes and faultCode0faultStringWarning:mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vol4/byethost7.com/b7_568567/lealtatest.22web.net/htdocs/Source code/kill.php on line 161 is the result still but the die is not telling me any problems???
  14. This works as long as i keep it fetching the array with where userid=$c_userid if ($_REQUEST[killname]) { $victim=$_REQUEST[killname]; $killquery=mysql_query("SELECT * FROM members WHERE `userid`=$c_userid") or die(mysql_error()); $killquery=mysql_fetch_array($killquery); $killquery=$killquery[health]; } BUT this DOESNT work if ($_REQUEST[killname]) { $victim=$_REQUEST[killname]; $killquery=mysql_query("SELECT * FROM members WHERE `displayname`=$victim") or die(mysql_error()); $killquery=mysql_fetch_array($killquery); $killquery=$killquery[health]; } Please can anyone inform me as to why the second one wont work when all i do is change the WHERE clause? Is it something im doing rong or is there a genuine reason it tells me faultCode0faultStringWarning:mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/vol4/byethost7.com/b7_568567/lealtatest.22web.net/htdocs/Source code/kill.php on line 161 line 161 is the fetch array bit. Thanks in advance.
  15. Thank you very much gingerrobot that is quite helpful ill topic solve this topic now and then start a new one should i need any specific help.
  16. Very true i suppose as the game type would but sureley there would be the ability to create a basic one where it says like where it gets the data and how it uses it to do the battle its kinda hard though i guess. OK i guess ill have to do it on my own i was sort of hoping not tutorials as i guessed it would be hard to make a tutorial but maybe advice on how they go. Thanks for all your help.
  17. $a=0; while ($a<10) { echo "Hello $a"; $a++ } Like so? Then what lol is it just get the data from the db or ?????
  18. Please does anyone know HOW to make Player Versus Player or even Player Versus NPC I have found some that someone else has made however there script is part of an open source game and as such is coded inline with that and hard to adapt please can anyone who knows how help?
  19. mysql_query("UPDATE polls SET `vanswer1`=vanswer1+'1' WHERE `pkid`='$pollid'") or die(mysql_error()); That is my code and i get no error from the die(mysql_error()); part so im guessing there is no problem but why wont the field known as vanswer not +1?? Please can anyone help? Any suggestions are helpful. EDIT: think i realised whats wrong.
  20. Ok i have sorted it now thank you i was missing a single )
  21. 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 '' at line 1 Ok so i now have some idea of what/where the problem is.
  22. $question=$_REQUEST['question']; $title=$_REQUEST['title']; $a1=$_REQUEST['answer1']; $a2=$_REQUEST['answer2']; $a3=$_REQUEST['answer3']; $a4=$_REQUEST['answer4']; $a5=$_REQUEST['answer5']; $sql=mysql_query("INSERT INTO polls (`title`,`question`,`answer1`,`answer2`,`answer3`,`answer4`,`answer5`,`dt`) VALUES ('$title','$question','$a1','$a2','$a3','$a4','$a5',NOW()"); if ($sql){ //everything between here $message="New Poll Added"; } else { $message="A problem in adding new poll"; } // and here is just for general information and conformation to the //staff so we know if poll was added or not Ok this is the code i have and it keeps showing the A problem in adding new poll Yet i cannot see why please can somone help me?
  23. I have javascript but it cant use the weird timestamp and countdown as a 23:59:40 Style that is why im asking about changing from timestamp to date and then countdown i think now maybe, should i be using date()? I know how to countdown but i need to change it from php readable to javascript readable
  24. Basically you need a drop down menu using the following code and then a form using the good old fashoined <form> tags. <html> <head> <title>My Page</title> </head> <body> <form name="myform" action="your process page" method="POST"> <div align="center"> <select name="mydropdown"> <option value="Milk">Fresh Milk</option> <option value="Cheese">Old Cheese</option> <option value="Bread">Hot Bread</option> </select> </div> </form> </body> </html>
  25. I have a bank script that gets the time from a databse however putting it into the database i use time()+24*60*60 which is one day. However this means that in the database is all those number what i would like to do is turn it from those numbers into a time and then have it "tick" down... OR Maybe just be able to skip the bit with turning it into a date and just make it so i can "tick" down 23:59:59 23:59:58 23:59:57 23:59:56 23:59:55 23:59:54 etc. Please does anyone know how i can 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.