Jump to content


Class Help combining HTML

  • Please log in to reply
No replies to this topic

#1 IainAdams

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 09 May 2006 - 06:53 PM

Ok, first of all i have an HTML form. This form requires bits of information put into it from a database. I need to pass this form a ProjID when i click on a button somewhere else and that projID then needs to be used to create the queries. So i need a class that's constructor takes a variable that is the project ID. Then that ProjID is used to get different query results and those results are used in the form.

My form code looks a lil like this:

<h1><center>STH NHS Foundation Trust</center></h1>
<h1><center>Research Department</center></h1>
<form action="updateDatabase1.php" method ="Post">
<p>STH Number : <?php echo "default" ?></p>
<p>Ethics Number: <?php echo "default" ?></p>
<p>Project Title : <?php echo "default" ?></p>
<p>Patients : (Please supply patient population Information here)
<p>Status <?php echo "default" ?>
<p>New Status
<input type="text" name"status" ></p>

so when a button is clicked elsewhere it creates an instance of this form and gives it the variable (projID) this variable then needs to be accessible in the HTML form.

Original plan was


class Questionnaire1{

var $ProjID = "hello";

function Questionnaire1($PID){
$this->$ProjID = $PID;

add this at the top. That would allow me to call the class and pass the ProjID. However the projID is not accessible in the form becuase the form is not "in" the class.

Sorry for the long post

Any help on this situation would be extremely welcomed. Thankyou

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users