Jump to content

topflight

Members
  • Posts

    402
  • Joined

  • Last visited

    Never

Everything posted by topflight

  1. I have installed this 3rd application on my server called PHP weather http://phpweather.sourceforge.net/ And I just want to have 3 airports with the ICON relating to that airport current weather conditions, but I am lost. Please help Thanks in advanced.
  2. I am trying to write a mysql query that will get either information take a look $opm2 = mysql_query("SELECT * FROM `o` WHERE id='$id' AND a='AL OR a=EG'"); When I run that query it gets the wrong information, it dosen't even get the ID, it get some random ID. The main question is how do you write an OR statement in a mysql_query
  3. I am currently using sessions, and I would like to create a remember me function in my login.php file so when the user logout it will destroy/unset the session, however when they return to the site their login info will automatically be in the box. I know you have to use session may some please give me an example with a form and php code thanks.
  4. Hello I am using IP Board as a forum on my site, and I would like some type of script that automatically creates the user when they register on the main site. Can anyone direct me in the right path to doing this thanks.
  5. Well is there some type of other way I can have that script to be ran more very often like every 1min.
  6. I have followed that and for some reason i get an error. And also it doesn't run every 15mins.
  7. Ok well then may you please guide me through on how to set up a cron job that runs a php script every 15mins.
  8. Hello I have a PHP script that needs to be ran like every 1min is their away to do this withour doing an cron job? Because my hosting company doesn't allow cron jobs to be ran under a 15 min interval. And If their is no other way may someone please tell me how to set up a cron job a php script every 15mins. I currently have it set up to run every 15mins however it dosent for some reason. So please help. Thanks in advanced.
  9. I am still confused, do I need to add a certain piece of code to the file I want to be executed?
  10. Well basically I need a script to be raned every 15mins without someone visiting the page.
  11. Quick question may somebody please tell me how can I run a simple PHP script every 15 mins every day every month, every week and etc.. lol
  12. I am trying to create a script that import user registration into PHPbb3. i.e: I have a main site and when the user register on the main site I also want my main site registration script to create them a PHPbb3 Forum account may somebody please explain/show how to do that. Thanks in advanced.
  13. This is my code and nothing isn't happening. $get = mysql_query("SELECT * FROM members"); while($row = mysql_fetch_assoc($get)){ $id = $row['login']; $od = str_replace('.', '-', strrev($row['last_pirep'])); mysql_query("UPDATE members SET last_report_n = STR_TO_DATE(last_pirep,'%m.%d.%Y')"); } echo'UPDATED Sucessfully!' ?>
  14. it already in a column in a table and I want to update an actual column to the converted valued?
  15. To begin with Facebook dosen't create each profile one by one :)lol. Also what you are trying to do it common. It is called the get method. Let me give you a breakdown: Database: Your database will store all your member info (i.e Name,Email,Age,and Etc...). However the main important thing in the database is the ID, you will be using that to call members information out. Table name members ID Name Email Age 1 John Doe johndoe@johndoe.com 25 2 Jane Doe janedoe@janedoe.com 25 Code: Now that a little kind of sloppy database design. Next you start coding: //Gets the Members ID $id = $_GET['id']; //Locate the member's info with the ID given $query = mysql_query("SELECT * FROM `member` WHERE id='$id'"); //See does the member exist $num = mysql_num_rows($query); //If the member does not exist shoot an error message out if($num == 0){echo'Member does not exist';}else{ //Member exist lets pull their info out the database $row = mysql_fetch_assoc($query); //Assigning Variables to info that is given $name = $row["name"]; $email = $row["email"]; $age = $row["age"]; Next just create a nice HTML table a display the information i.e: echo"Hello $name <br> You are $age years old<br> Your email address is $email<br> " The code above may have some errors but you should get the general idea. So now lets say you have a roster page and when the use click on their username you should have the link look like the following yoursite.com/profile.php?id=1 Since that ID is 1 it will then pull John Doe's information.
  16. So how should I do this if I have over 13000 records?
  17. With the following code the row is still the same: mysql_query("UPDATE members SET last_report_n = CONCAT_WS('-', RIGHT(last_pirep, 4), LEFT(last_pirep, 2), RIGHT(LEFT(last_pirep, LOCATE('.', last_pirep, 3), 2))");
  18. Cool now thats look a lot eaiser however how can I write that code? If I have over 50 records?
  19. The code above makes the coloum say 2005-01-20
  20. last_pirep is mm.dd.yyyy and I am trying to convert it YYYY-MM-DD. So my script can work. I am just lost. lol
  21. I have tried to do it however I created another column called last_report_n with a date value. And I ranned the following code and it makes the new table say 2010-05-03. However I have 63 rows and they all have the same value which they all should be different because the last report date is different. <?php $get = mysql_query("SELECT `last_pirep` FROM members"); while($row = mysql_fetch_assoc($get)){ $od = $row["last_pirep"]; mysql_query("UPDATE members SET last_report_n='$od'WHERE last_report_n='0000-00-00'"); } echo'UPDATED Sucessfully!' ?>
×
×
  • 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.