Jump to content

Jeffro

Members
  • Posts

    156
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jeffro's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. thanks, ajrocker.. I think that did it! I guess that should have been obvious, but I honestly just rarely do php.. and only the minimal change here or there when I need it a few times a year. I thought the name in the url (testvar=) could be anything and was just used as an identifier while the get had to match the actual $variable from the prior page. Thanks much for the help.. and the print_r command! (jesirose). Handy!
  2. I'm definitely not good enough to help you out with the code... but if you decide to look to an alternative, I had the pagination problem just last week and after trying this pagination script.. it worked like a dream. Best of luck!
  3. Didn't realize I didn't put that here.. but yes, I had it in there. Okay.. to avoid confusion, here is a copy/paste of my test1.php and test2.php (only the domain name has been changed): test1.php: <?php $testurl = "mytest"; echo $testurl; echo '<br>'; ?> <a href="http://domain.com/test2.php?testvar=<? echo $testurl; ?>">test2.php</a> test2.php: <? $testurl = $_GET['testurl']; ?> <html> <head> </head> <body> <? if (isset($_GET['testurl'])) { echo $testurl; echo '<br>'; } else { echo "sorry dude"; echo '<br>'; } print_r($_GET); ?> </body> </html> And here is the output of test2.php: sorry dude Array ( [testvar] => mytest )
  4. (Sorry.. just updated. I was testing with 2 different pages.. basically both doing the same thing)
  5. That was some fast help! Okay.. this definitely helps.. but not quite sure what it means. I get this: Array ( [url] => http://google.com )
  6. I had an iframe working for the last few months on a site at hostgator. Yesterday, it quit working (403 permissions error). After a long bout of trouble-shooting, I found out that it has something to do with mod_security that they have suddenly enabled (have no idea as I'm not a Linux guy). They told me they fixed the problem on my domain by whitelisting it as an exception, but strangely, even though the permissions error went away, the actual src= box of the iframe, which was the url variable I was passing in the url, no longer loads. So.. I'm trying to break this down into the simplest form to figure it out. I just understand php basics so needing some verification that I'm doing this right/wrong. Here's my code.. page1.php <? $testurl = "http://google.com"; ?> <a href="http://mysite.blah/page2.php?url=<? echo $testurl; ?>">page2.php</a> page2.php if (isset($_GET['testurl'])) echo $testurl; else echo "sorry dude"; I am only able to print "sorry dude". Am I doing something wrong or shouldn't this send the url? Thanks for the help!
  7. Glad you hooked me up with that because I had to study it about 10 minutes to figure out what you were doing! It finally made sense and I stuck it in my script.. and voila! Works perfectly. Thanks so much. Really appreciate it.
  8. Since I don't know how many words they will use in the search, I would create an array, I guess? If so.. How do I then use that to search?
  9. Looking some more, I guess maybe I should post in the php forum? I'm guessing I need to somehow break $find into an array and then search each individual word?
  10. $find is the search my user types in a form. In searching mysql I want to search inventory.title and inventory.description ... and I want to return all results that have $find in either the title or description. I tried this: select * from inventory WHERE title LIKE '%$find%' or description LIKE '%$find%'"; That works for single words but if the user types in 2 words, I need it to look in title and description for any combination. Example: My user might type: miami truck I need to then perform a search where miami might only be in the title and truck might only be in the description.
  11. The links are created by the Amazon API I'm using.
  12. Hi all. So I was pretty proud of myself because for the first time ever, I actually figured out how to update the .htaccess file without asking for help. Here's what I added: RewriteRule albums/(.*)/(.*)/(.*)/ albums.php?language=$1&searchindex=$2&searchparameterdata=$3 that worked to translate my links to: http://www.my domain.com/albums/en/music/beatles/ But then.. along came pagination and I'm stumped again. On clicking my next page, it now appends to the above url like such.. beatles/?language=en&locale=us&page=2&searchindex=music&searchparameter=keywords&searchparameterdata=beatles& Is this something I can correct in my .htaccess.. keeping the format of my working url and still letting pagination work?
  13. Wow.. much easier than I had thought it would be. Many thanks!
  14. For all my urls, I'm needing to replace all numbers, letters and underscores encountered at the very end of all my urls with the word "title" The /ref= will always be at the end of the url (representing the last forward slash in the url) and there are always either (and only) numbers, underscores or letters after the = sign. Example: $myurl = "http:ljlkjlkjlkjl.com/category/date/ref=123_abc_de" would be: http:ljlkjlkjlkjl.com/category/date/title Thanks for any help. I still just have the hardest time with regex.
  15. I've always used this query but it no longer works: $data=file_get_contents('http://clients1.google.com/complete/search?hl=en&q='.$keyword); For more info, I posted about this here last year. Now, the query no longer works. Is there any other way to produce the results or is it just no longer going to work for me?
×
×
  • 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.