Jump to content

RagingEagle

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RagingEagle's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No, I'm not trying to insert a new row. I'm trying to update exsisting rows which daily will have a different rank value, so if there are 30 rows I'd like the top row to be rated 1 all the way through to the last row which would be 30.
  2. I've tried that and I get the same result
  3. Hi, I'm having a problem incrementing a value and putting it into an Update statement, my code is as follows: What I want it to do is place the incremented number by $CurrentRank++; into Rank_Today, but it doesn't work and instead it counts every row in the table and puts that number in every Rank_Today column. Anybody have any idea why I'm experiencing what I am? I've tried putting echo $CurrentRank; and it outputs the correct number to the page itself, but it doesn't send the right value to the database (as I said it sends the total counted number to the database, so if there are 30 rows it would place the number 30 in every Rank_Today column instead of going 1-30). Any help would be greatly appreciated. Thanks!
  4. Hi, I have a whole bunch of HTML formatted text that is being outputted to my site and in it sometimes images are included but if the image is over 50k in size I don't want it to display that image. How would I go about doing this? I tried some code where it detected the [b]<img src[/b] part but how do I take the actual image, lets say: [b]<img src="theimage.jpg">[/b] how do I just get [b]theimage.jpg[/b] so I can check its file size? Thanks!
  5. Hi, I'm trying to use preg_replace to replace certain text in my website with the same text plus a link, I've got it to work but where my problem lies is if the text it finds is already in a link I don't want it to change that text. My current code: $originaltext = $array[$i]; $pattern = '/Text To Find/'; $replacement = '<a href="#">Text To Find</a>'; $originaltextprepped = preg_replace($pattern, $replacement, $originaltext); So my question is how can I do what I want but at the same time NOT replace the text when it's already in a link? Thanks!
  6. [quote author=kenrbnsn link=topic=110657.msg447767#msg447767 date=1160109888] Take a look at the functions [url=http://us2.php.net/parse_url]parse_url()[/url] and [url=http://us2.php.net/parse_str]parse_str()[/url]. They should do what you want. [/quote] I tried using parse_url() before I came here and it didn't work. But I didn't know about parse_str() which worked :). Thanks for the help!
  7. For my website I need to take the following URL: http://www.mysite.com/index.php&db_id=2&filename=3.zip And get the information from filename so that I can display the text "3.zip" on my webpage. I know I can do that with Get however Get only works when it calls the information from the URL bar. The above URL is not going to be in the URL bar but rather actual code on the webpage. Is it possible to do what I want? Thanks, RE
×
×
  • 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.