First, just to make sure we are on the same page here BandWitch... I wanted to reiterate my stance on some things from my earlier post...
Originally posted by TheDefender
There is NO ERROR CHECKING
There are a hundred ways to accomplish what you want to do, and this is just a sample.
There is no guarantee this will work (and it probably won't) for your particular needs.
I am providing absolutely NO support or help with this code. It is only to give a brief demo of what you seek.
This was only written to show you how you can get started.
To the REGS... No code critique here please. I know of the problems with this code.
[/list=1] [/b]
Now, I will tell you one thing:
// Create your connection to your DB
$connect = mysql_pconnect($localhost, $cobra_search, $*****) or die("Could not connect: ".mysql_error());
mysql_select_db($cobra_search, $connect) or die('Unusable database: '.mysql_error());
This will not work, unless you are predefining your connection variables before you define your connection... (Your connection should look more like:
// Create your connection to your DB
$connect = mysql_pconnect("localhost", "cobra_search", "*****") or die("Could not connect: ".mysql_error());
mysql_select_db("cobra_search", $connect) or die('Unusable database: '.mysql_error());
I did the variables thing, because I practice safe coding by coding my connection info into a separate include file rather than hard-coding it onto an easily exposed php page... I highly recommend you do some learning before trying some coding... and forget that I posted that code to begin with. I forgot, you don't know how to modify code to your own needs.
This really only accents a point I keep trying to make here. YOU have NO clue what you are doing. You are trying to jump into the deep end of the pool, and you can't even swim. Well, the lifeguards are off duty here.
i DON'T KNOW AHT THE LINK YOU AHVE ME CAN HELP me?
dar-k was trying to point you in the direction of learning some basics before you try your hand at this kind of coding.
Maybe, you will find this link to be of more use to you.