Jump to content

Jiraiya

Members
  • Posts

    206
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

Jiraiya's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. i was hoping this would do it $username = $_COOKIE['ID_my_site']; username = persons user name
  2. yes just for one user
  3. that code that you posted didnt do anything
  4. 1. yes i did mean name=pic 2. im trying to update the pic variable in my database with the text submitted in the form above
  5. I need help creating this php updating form its supposed to update a pic url with a new one that is submitted by a html form i what i have is shown below <form> Picture URL: <input type="text" pic="pic" /> <input type="submit" value="Submit" /> </form> <br /> </form> <?php $username = $_COOKIE['ID_my_site']; mysql_connect("mysql", "username", "password") or die(mysql_error()); mysql_select_db("members") or die(mysql_error()); $sql = mysql_query("UPDATE users SET `pic` = name") or die(mysql_error()); ?>
  6. ok thanks
  7. how would that be written like this? if ($row['potions'] >= 1 && $row['gold']>=1)
  8. i was wondering about "IF" statements if i could have multiple requirements for the if statement?
  9. i do know the basics the thing im really not sure is how to substitute the variable with one choosen by a user
  10. I need to know how to create a math system that pulls variables from a table that are selected im trying to create a program to do math with variables that are choosen by the user for example if i were to use a fighitng game it would be like Player 1 options Health (variable) is 25 punch(variable) is 10 kick 5 i need to make it so that the user picks the variable from a list and then the the variable that they pick is put into a equation with the only thing changing in the equation is the variable choose by the user
  11. what should the url be stored as in the database a char??
  12. im trying to display a image that is stored as a url in my database how would i retreive the image url in the database but have it show the image??
  13. im trying to set the random number that is generated to be set as the value of variable "number"
  14. here is the code it displays a random number but doesn't update the variable $username = $_COOKIE['ID_my_site']; $sql = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); echo (rand(1,10)); $var = rand(1, 10); $sql = "SELECT * FROM users WHERE number = '$var'"; mysql_query($sql) or die(mysql_error()); ?>
  15. yea kinda i have the variable set to "0" on default so i guess it would be an update mabey?
×
×
  • 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.