Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
link
Regular
Regular


Joined: Dec 24, 2004
Posts: 56

PostPosted: Wed Feb 22, 2006 11:33 am Reply with quote

U know those search boxes on alot of sites..

well i put one on mine.. the name of the search term box was... "term"

There are several choices from a drop down.

The page action is a page called search.php (go figure right... Laughing)

That page has some query...

Select * from tablename where $term = $type

the type is chosen from the dropdown..

Very simple right... well when the query is for a number.. it works fine.. if it is for Alpha Characters it gives me an error.

The mysql table fields are set to Varchar(40) not number... so i dont know...


Anyone have a clue.. ?

_________________
Only registered users can see links on this board! Get registered or login! & Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Wed Feb 22, 2006 11:37 am Reply with quote

Try
Select * from tablename where $term = '$type';
 
View user's profile Send private message
link
PostPosted: Wed Feb 22, 2006 11:38 am Reply with quote

Wow that was quick... ok so the lack of ' ' would case an error?

Trying right now.. thanks raven Smile
 
link
PostPosted: Wed Feb 22, 2006 11:41 am Reply with quote

Thank you so much man. Smile

Im going to add your banner or link to my site Only registered users can see links on this board! Get registered or login! now.

Not that its a huge site, but just as support. Thanks for the knoledge.

Worked great...
 
Raven
PostPosted: Wed Feb 22, 2006 11:43 am Reply with quote

RavensScripts
 
link
PostPosted: Wed Feb 22, 2006 11:48 am Reply with quote

Heres the code for anyone else that may want to make a php-nuke block supporting the site.. Smile

<?php

if (eregi("block-raven_add.php", $_SERVER['PHP_SELF']))
{
Header("Location: index.php");
die();
}

$content .= "<center>

<a href='http://www.ravenphpscripts.com' title='PHP Web Host - Quality Web Hosting For All PHP Applications'><img src='http://www.ravenphpscripts.com/images/mylinks/RavenWebServices.gif' alt='' border='0' /></a>

</center>";

?>
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©