Jump to content

FForce2195

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

FForce2195's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. >what does free site transfer means in web hosting? Where did you exactly read it? If a web hosting company says it, that means they will transfer files from an existing host to theirs for you with free of charge. Moving from one hosting company to another can be very stressful. Mishandling a database can cost you big. We've used 4 different ones. So I know... >is that automatic? No way...
  2. <form action="filename.php" method="post"> <?php $right = $_POST["right"]; ?>
  3. You need to grab a book that explains PHP and MySQL basics.
  4. Hello. It's a silly idea from a 4-week-old PHP beginner. What if you use Javascript with setTimeout("location.href='URL to the PHP file'", 6000000) to repeat the script?
  5. Change <form action=\"drop_pilot.php\" method=\"post\"> into <form action="drop_pilot.php" method="post"> . And you may want to remove all backslashes.
  6. No. I was doing that before. There were so many people using dynamic IP. So I was forced to abandon the IP limit. You can bind each license to a registered e-mail address.
  7. Okay. The following works good. $insert_percent = "UPDATE $table02 SET percent = num/$num_rows*100 WHERE num >= 0";
  8. WHILE ($row_ip = mysql_fetch_array($result_02)) { $$insert_percent = "UPDATE $table02 SET percent = '".$row_ip['num']."'/$num_rows*100 WHERE num >= 0" $insert_result = mysql_query($insert_percent,$my_sql_connect) or die(mysql_error()); } fills the percentage field with the same number. Why? ??? I think this mistake takes me back to the first post where I said that '".$row_ip['num']."' cannot be divided or multiplied by anything.
  9. $ip = <get the ip addres here>; No. I' want to fill any row with (".$row_ip['num']."/$num_rows*100). That's why I'm using WHILE ($row_ip = mysql_fetch_array($result_02)) { } Anyway, I'm very confused about when to use INSERT or UPDATE.
  10. Umm... When I used UPDATE, the same number filled the entire field under 'percent.' And somebody told me that that's what should happen with UPDATE. I'll try again with UPDATE, then. Thanks.
  11. Hello. I'm still a beginner in writing PHP programs. (3 weeks or so...) I hate to ask such basic questions. But I have run out of choices after spending several hours by trial and error. (1) I have a table ($table02) with 4 fields. One of the fields (num) in this table shows the numbers of the times in which the same IP addresses are recorded in another table ($table01). (Please see the attachment if necessary.) If I wanted to insert the same numbers shown in 'num' also into 'percent', I could write $sql_01 = "SELECT * FROM $table01"; $result_01 = mysql_query($sql_01,$my_sql_connect) or die(mysql_error()); $num_rows = mysql_num_rows($result_01); $sql_02 = "SELECT * FROM $table02"; $result_02 = mysql_query($sql_02,$my_sql_connect) or die(mysql_error()); WHILE ($row_ip = mysql_fetch_array($result_02)) { $insert_percent = "INSERT INTO $table02 (percent) VALUES ('".$row_ip['num']."')"; $insert_result = mysql_query($insert_percent,$my_sql_connect) or die(mysql_error()); } But I actually want to insert a percentage in each cell under 'percent' where a percentage is calculated by $row_ip['num']/$num_rows*100. If I write $insert_percent = "INSERT INTO $table02 (percent) VALUES ('".$row_ip['num']."/$num_rows*100')"; or even if I write $insert_percent = "INSERT INTO $table02 (percent) VALUES ('".$row_ip['num']."/30')"; the numbers in 'num' will be duplicated under 'percent.' What am I doing wrong? (2) I only want to insert numbers under 'percent.' If I use INSERT new rows will be inserted on top of existing ones. But I suppose I cannot use UPDATE in this situation. What can I do so that I can enter numbers only under 'percentage' without creating new rows. I'm sorry to ask such a basic question. I search for 'insert rows mysql' and read a few dozen matches. But I didn't find anything particular. Thank you for your time. [attachment deleted by admin]
  12. Hello. I have accomplished several goals thanks to nice people here though I've been writing PHP scripts for just 2 weeks and a few days. I have a small project to work with for the next few days. Then I'm thinking about learning how to extract Google's Gmail messages and importing them onto MySQL. Actually, I don't know if that's possible with PHP. I suppose it is. I have seen a website where they sell a library or something for extracting Gmail messages. I think I ended up with that website after asking a guy named Google or something. I also searched this place with 'Gmail extract' and didn't get precise hits. If you know where I can go to get information on accessing a Gmail account and extracting messages, please let me know. If you can give me a brief overview of what to do, that will be great, too. Thanks a lot.
  13. Yes, that works. Muchas gracias. Muchas gracias to Bendude14 as well. Some day, I'm going to be an expert PHP programmer who will be able to help both of you. Maybe, one year from now...
×
×
  • 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.