Jump to content

Use $_SESSION within mysql search


Hyperjase

Recommended Posts

Hey all,

 

Trying to search for something within a database, using two different fields, one text box and one drop down (the values are actually table names).

 

Here is what I have, this doesn't work:

<?php
$result = mysql_query("SELECT * FROM cakeorder WHERE `{$_SESSION['name']}` = '".$_SESSION['search']. "'");

 

Thanks!

 

Jason

Link to comment
https://forums.phpfreaks.com/topic/254610-use-_session-within-mysql-search/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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