Jump to content

Wildhalf

Members
  • Posts

    101
  • Joined

  • Last visited

Everything posted by Wildhalf

  1. Hi All, I am just finishing developing another site. What i want to do is return the value from a field called referrals which is an integer, add one to it and write it back to the database. Could anyone help me???
  2. Thank you very much... Ill have to remember that one in future.... All that was wrong was trying to get the info from tblFriends but table name was tblfriends... renamed the table on my servers side and all is well... thanks again kieron
  3. For the first part of your problem you could do something like this... I am using it on 2 of my sites at the minute... $refer_id = 1234(what ever you want); $sql = mysql_query("SELECT * FROM tblTable WHERE item_id='$refer_id'"); $data = mysql_fetch_array($sql); //$data[item_ 1-5] are the values returned from the datatbase were each item is a header $item_1 = $data[item_1]; $item_2 = $data[item_2]; $item_3 = $data[item_3]; $item_4 = $data[item_4]; $item_5 = $data[item_5]; $item_6 = $data[item_6]; /* Let's strip some slashes in case the user entered any escaped characters. */ $item_id = stripslashes($item_id); $item_1 = stripslashes($item_1); $item_2 = stripslashes($item_2); $item_3 = stripslashes($item_3); $item_4 = stripslashes($item_4); $item_5 = stripslashes($item_5); $item_6 = stripslashes($item_6); //tests results print "This is item $item_1\n"; print "This is item $item_2\n"; print "This is item $item_3\n"; print "This is item $item_5\n"; print "This is item $item_6\n"; give it a go..... kieron
  4. Hi, I need help.. I designed my site on my local pc testing my php with xampp... Everything was working fine but now that i have uploaded my site it get the following error message... Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource the code is as follows... ************************* // Get database connection include 'db.php'; // Create variables from URL. $refer_id = $_REQUEST['id']; //If domain is visited without a refer the site uses the following if ($refer_id == "") {  $refer_id = 75645361; } //retrieves information from database... $sql = mysql_query("SELECT * FROM tblFriends WHERE myspace_id='$refer_id'"); $data = mysql_fetch_array($sql); -->Line that is causing the problem //adds array information to a variable $friend_1 = $data[friend_1]; $friend_2 = $data[friend_2]; $friend_3 = $data[friend_3]; $friend_4 = $data[friend_4]; $friend_5 = $data[friend_5]; $friend_6 = $data[friend_6]; /* Let's strip some slashes in case the user entered any escaped characters. */ $friend_id = stripslashes($friend_id); $friend_1 = stripslashes($friend_1); $friend_2 = stripslashes($friend_2); $friend_3 = stripslashes($friend_3); $friend_4 = stripslashes($friend_4); $friend_5 = stripslashes($friend_5); $friend_6 = stripslashes($friend_6); hope someone ccan help me... Kieron
  5. Thanks a bunch worked like a charm..... Not much left now and i can launch my best creation yet... I believe my site will take Myspace adders to the next level... Everyone will be able to get thousands upon thousands of friends easily Thanks again
  6. I need Help Badly.... I think this is something simple but just cant get my head around it.... I have everything working In my project the database is returning everything it should, i know this as i am using a print staement to show it...... But i have one small problem i need help with.... In My mid.php file i am using javascript to open a new window which the url needs the value of one of the returned varialbes... THe right value is being returned as the print statement shows but in url states its an invalid url..... $friend_1 (is decalared as an int in database) is the variable i need on the end of my url, i know the javascript below is right also as if i use the number that the varialbe holds everything works fine... <a href="javascript:;" onClick="window.open('http://www.MySite.com'+'$friend_1','myWin','scrollbars=yes,width=694,height=500,left=150,top=150');"> <img src="friend1.gif" border="0"/></a></td>                       What am i doing wrong. When i use the print function in the code below it prints the right number... Any ideas??? Thanks Kieron Have a look at my php code: <? // Get database connection include 'db.php'; // Create variables from URL. $refer_id = $_REQUEST['id']; $sql = mysql_query("SELECT * FROM tblFriends WHERE myspace_id='$refer_id'"); $data=mysql_fetch_array($sql); $friend_1 = $data[friend_1]; $friend_2 = $data[friend_2]; $friend_3 = $data[friend_3]; $friend_4 = $data[friend_4]; $friend_5 = $data[friend_5]; $friend_6 = $data[friend_6]; /* Let's strip some slashes in case the user entered any escaped characters. */ $friend_id = stripslashes($friend_id); $friend_1 = stripslashes($friend_1); $friend_2 = stripslashes($friend_2); $friend_3 = stripslashes($friend_3); $friend_4 = stripslashes($friend_4); $friend_5 = stripslashes($friend_5); $friend_6 = stripslashes($friend_6); print "This is Friend $friend_1\n"; print "This is Friend $friend_2\n"; print "This is Friend $friend_3\n"; print "This is Friend $friend_4\n"; print "This is Friend $friend_5\n"; print "This is Friend $friend_6\n"; include "header.php"; include "mid.php"; include "footer.php"; ?>
  7. Hi, What i am trying to do is wass a value ( 54292kg ) to a form on someone else's website. This site collects 3 things Your name, your email and a code ( 54292kg is my code).  I want to fill in the code for the user. Is this possible??? I could even have a different webpage that sends the user to this page if needed
  8. Hi, Yet again im back here for some help. What i want this time is to know if it is possible to pass values entered on my site onto another form on a different website.. Basically i want the user to enter the details on my page and i want to automatically fill there details into a different site... thatnks Kieron
  9. thanks all.... Ill give it a go later and tell you how it goes
  10. Was just looking into that.... Could i setup a php script called cron.php like one of the below scripts and get his server to call that Could it be as simple as thisPHP file work??? Name: cron.php ********************** <? include "http://www.MySite.com/Dirctory/cron.php" ; ?> ********************** or would i have to execute the script??? ********************** <?php exec ('http://www.MySite.com/Dirctory/cron.php'); ?> **********************
  11. From what i am reading on the web... i can't use my domain name so it could the path be */15 * * * * /home/space/s/d/r/dave/html/cron/cron.php I want it to run every 15 minutes
  12. Back to the reason i am here....Can anyone help thou??? [quote author=Wildhalf link=topic=107231.msg432113#msg432113 date=1157986020] Hi Again, I Now have a friend that is willing to run the cron job for me.... But i just want to make sure i set it up properly... Bellow are the 2 cron jobs i need to setup ***************Start of Cron Job******************* - "php /your_installation_path/cron.php" and set time so that it runs every 15 minutes. (NOTE: The time setup should be something like this : 15 * * * * [ which means the script will run every 15 minutes ] ) - "php /your_installation_path/email_cron.php" and set time so that it runs every 15 minutes. (NOTE: The time setup should be something like this : 15 * * * * [ which means the script will run every 15 minutes ] ***************End of Cron Job******************* How would i set it up using my friends control panel??? Could it be either of these?? http://www.MyDomain.com/Dir/cron.php or do i need the /php (don't think its this one) /php/http://www.MyDomain.com/Dir/cron.php Could some one please advise?? [/quote]
  13. I know they do but have paid for 2 years and my site is just about finished have put in alot of man hours building it and Have several PHP scripts running perfectly... I will move on once i am finished, Once the site is ready and i have nothing mnore to do i will go somewhere else... THinking about ipower.....
  14. Hi Again, I Now have a friend that is willing to run the cron job for me.... But i just want to make sure i set it up properly... Bellow are the 2 cron jobs i need to setup ***************Start of Cron Job******************* - "php /your_installation_path/cron.php" and set time so that it runs every 15 minutes. (NOTE: The time setup should be something like this : 15 * * * * [ which means the script will run every 15 minutes ] ) - "php /your_installation_path/email_cron.php" and set time so that it runs every 15 minutes. (NOTE: The time setup should be something like this : 15 * * * * [ which means the script will run every 15 minutes ] ***************End of Cron Job******************* How would i set it up using my friends control panel??? Could it be either of these?? http://www.MyDomain.com/Dir/cron.php or do i need the /php (don't think its this one) /php/http://www.MyDomain.com/Dir/cron.php Could some one please advise??
  15. One last question.. If i go with my friends hosting for the cron job... It would still be possible to use my own Mysql database as i don't know if he would let me use his??? Thanks again
  16. Thanks fo your help.... Just have to go kick GoDaddy in the but... Don't know why i went with them... I have one other idea but will have to ask a friends if i can use a small amt of his hosting...
  17. I could start the script once a day maybe... is that possible???  All it has to do is call 2 other scrits every 15 minutes....
  18. There is no way of doing it at all?? Hmmm I was just thinking, Could i have a script with a countdown or clock and say each time it reaches .15, .30, .45, or .00 run the script. Like run a script once in an indefinite loop with if statements.... Just wondering
  19. Hi there, My problem is that my hosting doesn't let you run CRON jobs. When i paid for my hosting i had never heard of them. Whats going on is i have a script that i want to install that uses CRON jobs. There are 2 CRON jobs that need to be set to run 2 scripts every 15 minutes. These scripts are used to Automate Follow Up Email's. What i was wondering is there anyone out there that know some PHP code that would count down and run each of these scripts every 15 minutes??? or Is there anyway to get these scripts to run themselves automatically ever 15 Minutes?? Please Help Need This To Work!! Stupidly i paid for 2 years of hosting so can't just change.... Thanks! Kieron
  20. Carter, Sorry it took so long to get back to you but i sorted the problem.... I figured out a better way to do what i wanted.... thanks for trying to help
  21. Hi, I have a php script. One of the modules is called HtPasswd.class.php Within in this module there are2 functions i want to use addUser(email, password) cryptPass(password) What i need to know is how i can call these functions properly from my main php file called register.php When i try either of these, $enc_pass = $Htpasswd->cryptPass($user_password); $this->$enc_pass = $Htpasswd->cryptPass($user_password); I get the following error Fatal error: Call to a member function on a non-object Anyone out htere know how i can call these functions?? thank you Kieron
  22. I'm Complete Newbie to PHP but understand it Just a short question... Could someone give show me a small bit of html code in a php file.. What i am doing, im editing a login script that i just wrote thanks to a tutorial from here on phpfreaks, and want to edit the members area... Here is the code for the members area at the min [code]<?php session_start(); echo "Welcome ". $_SESSION['first_name'] ." ". $_SESSION['last_name'] ."!     You have made it to the members area!<br /><br />"; echo "Your user level is ". $_SESSION['user_level']." which enables     you access to the following areas: <br />"; if($_SESSION['user_level'] == 0){     echo "- Forums<br />- Chat Room<br />"; } if($_SESSION['user_level'] == 1){     echo "- Forums<br />- Chat Room<br />- Moderator Area<br />"; } echo "<br /><a href=logout.php>Logout</a>"; ?>[/code] Also I have multiple pages that will be linked to this members area, how will i keep them private??? Thank you for all your help Kieron
  23. Thank you for your help GingerRobot! I used http://www.phpfreaks.com/tutorials/40/0.php tutorial. It is missing a few bits and pieces that can be got from the other tutorial. But i now have the PHP running completely all i have to do is modify the login area and that thanks again Kieron
  24. I want to password protect a directory as i already have a database in use with a PHP script and i want to use the login info from this database to let my users login to another private area...
×
×
  • 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.