Jump to content

casbboy

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.campus-resource.com

Profile Information

  • Gender
    Not Telling

casbboy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I figured it out. I had a javascript being called (change the value of the Submit button onclick) and it was holding up the show in IE. I just added submit() first and it fixed it. Thanks Ryan
  2. I have a form targeting an IFRAME hidden on the same page. The form posts a few variables over to it. While the whole thing works as it should on FireFox, the IFRAME doesn't respond at all in internet explorer. Is there a fix to this? Thanks Ryan
  3. I have a table with rows of small bits of html code. I have already set it up to look for each row that has an image in the code like so <img src="http://www.site.com/file.jpg" width="80" height="90"> I need to create a program with preg_match and preg_replace that will first find the image file's source and then remove the entire image tag. the image tags can be slightly different. some have the '/' at the end and some come with alt tags. How can I do this? I need to get the source then remove the whole thing entirely. Thanks Ryan
  4. Here is what I have: First, I set up two arrays to be used later (from a mysql query): [code=php:0] while($alinks = mysql_fetch_array($listlinks)) { $clinks[] = $alinks['link']; $cid[] = $alinks['article_id']; } [/code] Now I check to see if a new set of links matches any in the $clinks array: [code=php:0] $nc = 0; $pos = 0; foreach($info[items] as $in) { if(in_array($info[items][$nc][link], $clinks))  { $pos = strpos($info[items][$nc][link], $clinks); $abar = '<a href="/article/'. $cid[$pos] .'"><img src="/images/art/indexed.gif" border="0"></a>'; } else { $abar = '<img src="/images/art/notindexed.gif">'; } $nc = $nc + 1; } [/code] If the link already exists, I want the 'article_id' of the matched link to be placed in to the href.  Hence I have the $cid array with the $pos variable giving the position with $cid[$pos].  Unfortunately, this isn't working as I had hoped, and only gives the same number for all the links that match. ANy suggestions? Thanks Ryan
  5. The questions says it all. Tons of sites now have links that, when you put your cursor anywhere on the link, a div/span/layer pops up right there with more information about the link. Such as text in a yellow box. The layer then follows the pointer until it is taken off of the link. How do you do this? Thanks Ryan
  6. I have a mod-rewrite working that puts the title of an article into an html looking page like so. [a href=\"http://www.sample.com/name-of-file.html\" target=\"_blank\"]http://www.sample.com/name-of-file.html[/a] I want to make sure that characters not allowed in the URL don't make it in there. Is there a PHP function that removes everything that typically isn't allowed in an URL address? such as ( ) " ' html tags carrots and more? Thanks Ryan
  7. I have a php update like this: [code=php:0] $upsql = mysql_query("UPDATE comments SET comment2='$oldcomment', comment='$newcomment', edited='y', verified='$verified' WHERE user_id='$userid' AND edited='n' AND comment_id='$commentid'", $connection) or die(mysql_error()); [/code] The problem is that $oldcomment features a ton of text that has both "this" type of quotation marks and 'this' type of quotation marks. I get a mysql error because of these quotation marks when trying to update the database. I have done a string replace to pull them out just for testing sake and the update works fine... so it is the existance of the quotation marks that are causing issues. i NEED these quotation marks to remain, but how can I do the update query and avoid the error? Thanks Ryan
×
×
  • 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.