Jump to content

nicuz

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by nicuz

  1. I've made a classified ads website. I have 2 fields in my database: adTitle which is varchar 255 adInfo which is varchar 255 Whenever I try to post an ad that contains the character ' in the title I get an error. So for example if the title of my ad is: 12' pencil I get the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'pencil','nick','32','accessories','2007-10-16','Deonne','2007-12-15 I don't understand because the 2 fields are both varchar 255 but if I use the ' symbol in the adInfo fields, I get no error. Only in adTitle. Anyone knows what's wrong? Thanks
  2. Hi, I am trying to make friendly urls for my website. Here's what I want: www.mydomain.com/display_ad.php?id=3 to become www.mydomain.com/display_ad_3.html I read some tutorials on modyifing the .htaccess file and here's what I got so far: AddHandler server-parsed .htm AddHandler server-parsed .htm RewriteEngine On RewriteBase / RewriteRule ^display_ad_([0-9]+)\.html$ /display_ad.php?id=$1 [L] And it's not working. Anyone knows where the mistake is? Thanks
  3. Tried this and it did not work. I got the "An error occurred" error. $data = $row['picture']; $data = base64_decode($data); $im = imagecreatefromstring($data); if ($im !== false) { header('Content-Type: image/jpeg'); imagejpeg($im); } else { echo 'An error occurred.'; }
  4. I made a script that stores a picture in a database. I have 4 fields in the database: picName, picType, picSize, picture (picture is the field where the picture is actuallu stored; the other fields are self explanatory). What I want is to display the picture on my website. I have my SELECT query but when I try to display the picture using {$row['picture']} I only get a long list with letters, numbers and strange symbols. I assume that the picture is not displayed like any other text in the database so if you guys could help me I would really appreciate it. Nick
  5. actually it was an error from my .htaccess. I got it working now
  6. so you can see everything fine? no..the toolbar is in beta testing and its not available yet
  7. Could you guys acces my webpage http://www.aboutagloco.com with Internet Explorer? When I do I get the error in the picture below. My webpage works fine with Firefox. [attachment deleted by admin]
  8. Thank you. It worked. Can you please tell me what were the ilegal characters?
  9. I have a crawler that will fetch urls from a webpage. The urls are stored in my database. The next time I run the crawler script it checks the page for new urls and adds them to the database. The problem I'm having is that some of the webpages have urls with invalid characters (I think): [CODE]<a href="javascript:MM_openBrWindow('/pay-5','terms','scrollbars=yes,width=500,height=400');">[/CODE] This kind of url cannot be inserted in my database: [CODE]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','terms','scrollbars=yes,width=500,height=400');', '2006-11-01 00:38:59', 'pl' at line 1[/CODE] Anyone knows a way around this? I appreciate it
  10. I am recording my voice. Trying to make some podcasts for my website.
  11. I am curently using a cheap $15 microphone and my recordings have a really noisy&ugly background. I don't know what's the cause of this: the cheap microphone, the sound card or the software I'm using to record. If it is the microphone, could you guys recommed a good one, in the $50-$100 price range? I am not looking for something very professional, but something better than you average microphone. Really appreciate your help.
  12. No. The first 13 characters. Eg: in the field I have stored: I love php and I love programming. What I want is to select the first 13 char. which are: I love php an
  13. I have a field in my database called "description" (type:longtext) and I would like to retreive the first let's say 13 characters. What wold the select query be?
×
×
  • 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.