Jump to content

Use of Alt tags on photos used in a PHP script via in a MySQL database


gutsy

Recommended Posts

Hello,

I'm new to this forum (I just joined).  I'm a web designer in NJ but not a PHP expert by any means and I have a question regarding the use of ALT Tags in a PHP photo script used on a web site. 

 

I purchased a photo script from http://www.php4script.com/.  The script is used at my client's site:  www.AEConstructionNJ.com

 

The script was customized the way I asked with before and after shot comparisons of my client's construction work.  If you click on any of the images at the top of the web pages at the link above, it will take you to the related photos utilizing the PHP photo script.

 

My client has requested that I place ALT tags with their business name and /or town where the work was done, on all their images (375+ of them) that are in a MySql database via this PHP script.  The question I have is  ... is this necessary?  Can Google or any of the major search engines capture the ALT tags contained in a database when ranking their site at Google or any major search engine?  I use ALT tags for images on the web pages and I kbnow it's advantages for index searching, however the PHP script has no option to add ALT tags. 

 

The thought was that after tagging an image within the database with an alt tag for example "Hamilton NJ Kitchens"  ... that they would be found this if someone was to look for kitchen design in Hamilton.

 

Am I correct in assuming that Google cannot search for ALT tags for images in a MySQL database? The images only load when they are clicked.

 

I really don't want to do this if it's unnecessary for me and to my client who would be billed for his time. I'd appreciate PHP expert's thoughts on this ... especially those with search engine indexing knowledge.

 

Any supporting infiormation to say it's possible or not possible and why would be greatly appreciated.

 

Thank you in advance!

Link to comment
Share on other sites

Alt tags are supposed to describe the photo itself.  The search engine already knows what is relevant and not on the page.  Don't try and force them to take a keyword; you might burn yourself.

 

Search engines do not have access to anything not linked on your site, besides the usuals like robots.txt or favicon.ico.  There's no way it would index or even want to index an SQL database.  You have to code for it to get onto the photo itself.  That means query the database, obtain the row, and echo the output using PHP and put in the alt text dynamically, server-side.

 

In past experience, search engines do a great job if your site is readable (images aren't; tags/text are), standards-compliant, content is concise and describes the company/org/website, and sometimes if reputable sites link to you (I don't think 'yellow pages' and massive link collection websites really count).

Link to comment
Share on other sites

BlaZure is correct. You *can* add this info as the alt tag, but google will not index the tags the way the client wants, as the alt tag is supposed to describe the image being shown. As such google will thing that the address is a description of the image.

 

Your client is attempting to use 'black hat SEO'. This kind of behavior can get one banned from the search engines. This usage is a bit on the borderline, so I'm not 100% sure that the search engines will ban if they find it, but it's a possibility.

 

 

Link to comment
Share on other sites

Thank you  BLaZuRE and haku. 

 

This is exactly what I thought and I appreciate the time you took to provide me the information I need.  I certainly don't want to do anything that would ban my client's site from Google or other search engines.

 

I'll keep monitoring this thread in case anyone has any other thoughts either way on this.

 

Thank you again for taking the time to respond!

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.