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