Jump to content

TTMW

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

TTMW's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. well at the moment when the code runs it just puts the value held by the 'tokens' variable into the earnings row.and doesn't add it to the current amount.
  2. im geting variables from flash using php.but i dont know how to use them variables in these statement... $placeEarnt = $_POST['placeEarnt']; $earnings = mysql_query("SELECT '$placeEarnt' FROM users WHERE username = '$username'")or die(mysql_error()); if(mysql_num_rows($earnings)==0) echo "There is no data in the table"; else for($i=0;$i<mysql_num_rows($earnings);$i++) { $row=mysql_fetch_assoc($earnings); } $updateEarnings = $row[earnings] + $_POST['tokens']; $result = mysql_query("UPDATE users SET $placeEarnt ='$updateEarnings' WHERE username = '$username'") or die(mysql_error()); this doesnt throw an error but only adds the value in $_POST['tokens'] to the database.does anyone know how i can make this work?thanks
  3. when runing my login code i get the following warning caused by the cookies that are being made and the function header() to redirect to another page. Warning: Cannot modify header information - headers already sent by ..... what is the reason for this error?is it due to something with WAMP5 and it not being on a real server or is it my code?thanks in advance
  4. at present i am using the die() method to show an error message,but is it possible to redirect to an error page instead, and how would i do this?or any other options for better ways would be appreciated,thanks
  5. hi,can anyone tell me the advantages of a login created with mySQL over just using php and writing to text files(if this is posible)?is mySQL safer and more secure in any way or just easier? thanks in advance for any feedback
  6. i'm starting to learn php and have played with a few emailers in the past but i want to now try and make a log in type thing for my site,i know thers a load of tutorials out on the web but they all seem to use MySQL and i haven't a clue what it is or does.does my server have to have MySQL enabled like it does with php?or is MySQL part of php? any info on this would be great if anyone can help? and also is a log-in script hard for a beginner to php (not programming) ? thanks
×
×
  • 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.