Jump to content

Wildhalf

Members
  • Posts

    101
  • Joined

  • Last visited

Everything posted by Wildhalf

  1. I get the following errors mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource I am using XAMPP on my local machine to test
  2. It's been a while since i looked at php and SQL nad my head is hoping at the minute... I know this isnt to hard but how do i turn returned results into an array if my query is as follows $getData = mysql_query('SELECT * FROM name'); $result = mysql_query($getData); Thanks for you help
  3. Hi I am using a pagination script got from (http://phpsense.com/php/php-pagination-script.html) It uses the following line to decided how many pages to display. I want to display all my pages and this line of code should do it but doesn't The ceil function as i understand it should round up to the next integer. $this->max_pages = ceil($this->total_rows/$this->rows_per_page); There are 49 entries in my database and that should make max_pages = 5 but it only displays pages 1 2 3 4 but you can click the next arrow and it displays the fifth page but never sshow in in your list. Can anyone tell me what i can change this code to to make sure it always rounds up to the next number.
  4. Hi, I have already created a html page with the letters A-Z on it and created the php code to access my database and return all entries with regards to which letter had been clicked. To make things look better and not have hundreds of items returned on the one page i want to be able to create another list under the A-Z with 1 to whatever puting 10 rresults on each page. (eg list will look like, 1 2 3 4 5 6 7 8 9) and when i click 1 the first 10 will apear and 2 the second and so on. I dont have the code with me which i use for the A-Z but will post it later tonight if needed. Has anyone any ideas on how to create this linked list with code.
  5. Neptunus Maris thanks a bunch that worked great
  6. I believe im getting the letter fine using the following code. // Create variables from URL. $letter = $_REQUEST['letter']; print "letter : $letter"; It prints the right letter anyways. I'm returning and printing the first result of the field offer to screen. but want it to print all results. How would i use a while loop with arrays??
  7. I am using the following code to return all entries into my database with the letters begining with $letter which is taken from my URL $sql_1 = mysql_query("SELECT * FROM tbl_offers WHERE business_name LIKE '$letter%'"); $data_1 = mysql_fetch_array($sql_1 ); It works but what i want todo is print all returned values for offer, example below prints one but i want to print all entries. $offer = $data_1["offer"]; print "</BR>offer : $offer"; Anyone got any ideas??? Thanks in advance. Kieron
  8. Hi All, I was wondering if anyone knew where i could ge my hand on or even give me an idea on how to get started on a script that returns everything from a database starting with a certain letter. What i am doing is like a phone book. there will be a list of businesses and when a visitor to my page clicks on a for example the site will display all the a business names. thanks kieron
  9. Thanks all for your help. Got everything working fine now it is one great tool i found for drwing graphs from database using flash and php..... http://www.maani.us This will make the site im developing brilliant
  10. Thats ok I was only testing. Will change the username onc ei have everything else working. My own code works and so does code i want to put together with it. But when combined everything goes pear shaped.... Going to try one more thing and then ill post all the code for your help...
  11. Hi All, It's been a while since i played with PHP and i cant figure out how to fetch an entry in my MYSQL DB and display the results. I thought something like the following would print out the username. $result = mysql_query ("SELECT * FROM weight WHERE username='wildhalf'"); $data_result = mysql_fetch_array($result); echo $data_result[username]; But how would i return all entries for a certain username, in the table and display them???
  12. Hi All, I am looking for the code to rotate a link on my site based on visits. Basically all i need is to display one link when the i get a hit and a different one when i get the second hit and then back to the first one on the third hit and so on. So in other wors a rotation script based on page hits. Can anyone help me out??
  13. That would be half of the problem i suppose. I will need to encrypt the link also. Thank you
  14. Hi all, I assume this is possible but can not figure out how to do it. I was wondering if anyone could point me in the right direction. I want to create a script that sends customers a link that expires after 24hours. This way they can not send out the link to anyone else. hope this is enough info. kieron
  15. Here is a mailing script i use the whole time that always works.... $firstname = 'persons name'; $email = 'persons email'; // Let's mail the User! $subject = " Enter Subject Here "; $message = " Enter Subject Here "; $femail = "From: $firstname<$email>"; $remail = "Reply-To: $firstname<$email>"; $headers = $femail . "\r\n" . $remail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail('Your email Goes Here', $subject, $message, $headers);
  16. Thank you both i will check it out later should be able to figure it out from there
  17. Hi all, This is an easy one for some of you but i haven't seen a way to do it... I want to distingush between browsers Users are visiting your page with. If there using anything other than IE i want to tell them that the page is best view in IE and try get them to open it in IE. Anyone have any ideas???
  18. Use the following it works for me with headers and all... You may have to change the header slightly for your own email.... // Let's mail the Autoresponder! $subject = "$firstname, E-Z-M Login Details"; $message = "Hi $firstname, Thank you for joining E-Z-M. Here is your Login details, User Name : $email Password : $password To Your Success! E-Z-M Admin "; $femail = "From: $firstname<$email>"; $remail = "Reply-To: $firstname<$email>"; $headers = $femail . "\r\n" . $remail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail('$email', $subject, $message, $headers);
  19. Just to let you all know... I used the second example in the above post and it works like a dream... I changed the .close to 500 which is half a second... The paypal page opens and the main page shuts behind it....
  20. I've looked into it a bit further and Frost is right.... I could use <? header("Location: http://www.paypal.com/xclick/business=test@user.com&amount=1.00&item_name=Testing+123"); ?> or i could use javascript like the example below <html> <head> <script language="JavaScript" type="text/javascript"> <!-- function submitForm() { document.myForm.submit(); setTimeout('self.close();',10000); } //--> </script> </head> <body onLoad="javascript:submitForm()"> You are being redirected to PayPal. This window will close itself in 10 seconds. <form name="myForm" method="post" action="https://www.paypal.com/cgi-bin/webscr" target="_blank"> <input type="hidden" name="business" value="pay@site.com"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="item_name" value="test"> <input type="hidden" name="amount" value="12.00"> </form> </body> </html>
  21. thanks again... Ill test it out later and get back to you
  22. THanks frost, I didn't describe what i want properly... All i wanted on my html page is a button with a link to some php code that holds the information about the payment. Basically i don't want the user to be able to look at the paypal payment source code.
  23. Hi, I was wondering if it is possible to hide some html code in a php script. What i have is a paypal button on my site but i want to hide the form code for paypal. What i want is for my visitor to click this button which calls a php script, which then redirects the user to the paypal payment screen. The reason i am doing this is because i can not encrypt my subscription button as i am trying to pay my affiliates directly into there paypal account regards, Kieron
×
×
  • 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.