Jump to content

[SOLVED] passing variables via javascript onClick


DrTrans

Recommended Posts

How do i pass the hidden fields threw the onClick

 

Heres the database connect:

$connect = mysql_connect("lXXXXXXX","XXXX","");
        mysql_select_db($tpdbname);
        $query = "SELECT * FROM applicant WHERE Applicant_ID = '$applicant'";
        $result = mysql_query($query);
        while($row = mysql_fetch_assoc($result))
	{
		$applicantid 		= $row['Applicant_ID'];
		$appid 				= $row['ApplicantID'];
		$applicantfname 	= $row['FirstName'];
		$applicantlname 	= $row['LastName'];
		$applicantphone 	= $row['HomePhone'];
		$unitid 			= $row['PropertyID'];
	    $applicantwphone 	= $row['WorkPhone'];

 

Heres my window.open()

if($screenstatus == "Declined") {
print"<br> Screening: <font color=\"red\">$screenstatus</font></b>&nbsp&nbsp&nbsp<INPUT type=\"button\" value=\"Approve!\" onClick=\"window.open('approvedetail.php','mywindow','width=400,height=400')\"></form><hr>\n";

 

Basically when they click the approve button. it needs to know what the ID number of the record that they are approving.

 

 

heres is what my applicantdetail.php file looks like:

<html>
<h4>Approval Required</h4>
<form action="approvedetail.php" method="POST">
Approval For Applicant: <input type="text" name="applicant">$applicantid<br />
Approved By: <?php session_start(); $dbusername = $_SESSION['username']; echo"$dbusername"; ?><br />
Notes:<br /><textarea name="notes" cols="40" rows="10">Enter Notes Here...</textarea>
<br />
<hr /><i>I have recorded your IP as:<?php echo $_SERVER['REMOTE_ADDR']; ?></i>

<input type="submit" name="approve" value="Approve Applicant">
</form>

 

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.