Jump to content

gears

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gears's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK, OK, I know what you're all going to say here - use PHP5, it's better and is backwardly compatible etc etc. However, I've tried php5 and 99.5% of the site is working on my server apart from some dodgy phpBB modules and tweaks, which aren't working properly. Is there a way to (a) change php5 compatibility to be "super compatible" with php4 so far back so that it effectively operates like php4 or (b) install php4 onto Fedora Core 7 ? I've tried it myself and downloaded the tar.gz file, done the make, make install etc but there's no libphp4.so anywhere and it doesn't appear to have done anything after install. Any ideas? I know this is a tad generic, and in reality I SHOULD just put PHP5 back on but I'm looking to replicate the setup of another server and - unfortunately - this new quad-core box will only accept a newer OS. I've tried Debian etc but the SATA Controller and Motherboard isn't yet supported so I'm stuck between a rock and a hard place.
  2. [!--quoteo(post=368355:date=Apr 25 2006, 11:10 AM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Apr 25 2006, 11:10 AM) [snapback]368355[/snapback][/div][div class=\'quotemain\'][!--quotec--] You need to look into strip_slashes and add_slashes. The database my have the titles stored as: That\'s the way to do it and you query is looking for: That's the way to do it or vice versa. [/quote] Excellent ! What a muppet I am for not finding that :) Changed it to ... <?php $titlenew = addslashes(htmlspecialchars("$title[$i]")); ...... and everything works fine! :)
  3. Guys, I've written a really quick and rather crappy script which compares two tables. It does this because my content management system on www.coolsmartphone.com puts news stories in one table, but the commenting system uses another table. Anyhoo, I wrote a script that compares the two fields in two tables and fires out the result as a URL, so that users can click the appropriate link. All is well until I enter a news item with a subject like "It's here" or "That's the way to do it" etc etc - you get the picture. Although the "LIKE" command in MySQL is doing it's job, the "mysql_result($leigh2, 0);" isn't working when a -- ' -- is in the subject line. How do I get it to select it and IGNORE that ? The -- ' -- symbol can't be changed in the database, so I need some way of saying, "grab this field as a whole". Here's the script. Yes, crap.. yes, there's probably a neater way of doing it.. but I was drunk at the time I wrote it.. :) <?php $titlenew = htmlspecialchars("$title[$i]"); $leigh="SELECT * from phpbb_topics where topic_title LIKE '$titlenew'"; $leigh2=mysql_query($leigh) or die("Could not select it"); $leigh3=mysql_fetch_array($leigh2); $thelinky=mysql_result($leigh2, 0); $thecounter=mysql_result($leigh2, 0, 6); if(!$leigh3) { echo "No link yet"; } else { print "<a href=\"http://www.coolsmartphone.com/forum/posting.php?mode=reply&t=$thelinky\"><B>Add</a></b> or <a href=\"http://www.coolsmartphone.com/forum/viewtopic.php?t=$thelinky\"><B>view comments ($thecounter)</a></b>"; } ?>
×
×
  • 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.