Jump to content

Php with Jquery (SELECTING)


Tenaciousmug

Recommended Posts

How do you SELECT * FROM table WHERE field='(a jquery value)'

 

All I want to know is to know what gender they clicked on so I could run this query:

 

SELECT * FROM table WHERE gender='whatever they clicked';

 

Here is my Javascript code:

<script>
$(document).ready(setupBeginning);

function setupBeginning()
{
	$("#rest").hide();
	$(".femaleTrigger").click(showRestFemale);
	$(".maleTrigger").click(showRestMale);
}

function showRestFemale()
{
	$("#rest").show();
	$("#gender").hide();
}

function showRestMale()
{
	$("#rest").show();
	$("#gender").hide();
}

$(function()
{
	$( "#tabs" ).tabs();
});
</script>

 

Now here is my HTML code:

<table cellspacing="0" class="news" align="center" id="gender">
		<tr>
			<td colspan="2" style="border-bottom:1px solid #000;">
				<center>Click on your gender:<br>
			</td>
		</tr>
		<tr>
			<td style="border-right:1px solid #000; border-bottom:1px solid #000;" width="300">
				<center><b>Male</b></center>
			</td>
			<td style="border-right:1px solid #000; border-bottom:1px solid #000;" width="300">
				<center><b>Female</b></center>
			</td>
		</tr>
		<tr>
			<td class="maleTrigger" name="Male" style="border-right:1px solid #000;" width="300" height="400">
				<center><img src="http://www.elvonica.com/wardrobe/imgs/maleimage.png"></center>
			</td>
			<td class="femaleTrigger" name="Female" style="border-right:1px solid #000;" width="300" height="400">
				<center><img src="http://www.elvonica.com/wardrobe/imgs/femaleimage.png"></center>
			</td>
		</tr>
	</table>
	<table cellspacing="0" class="news" align="center" id="rest">
		<tr>
			<td height="400px" width="300" style="border-right:1px solid #000;">
				<center><img src="#" alt="image"></center>
			</td>
			<td height="400px" width="300" valign="top">
				<div id="tabs">
					<ul>
						<li><a href="#bases">Base</a></li>
						<li><a href="#eyes">Eyes</a></li>
						<li><a href="#mouths">Mouth</a></li>
						<li><a href="#noses">Nose</a></li>
						<li><a href="#hairs">Hair</a></li>
					</ul>
					<div id="bases">
						<p>Bases here.</p>
					</div>
					<div id="eyes">
						<p>Eyes here.</p>
					</div>
					<div id="mouths">
						<p>Mouths here.</p>
					</div>
					<div id="noses">
						<p>Noses here.</p>
					</div>
					<div id="hairs">
						<p>Hairs here.</p>
					</div>
				</div>
			</td>
		</tr>
	</table>

 

Now I want to use PHP to

SELECT * FROM tablename WHERE gender='whatever they clicked';

 

How would I receive the data of what gender they clicked on?

Link to comment
https://forums.phpfreaks.com/topic/238042-php-with-jquery-selecting/
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.