Jump to content

want to put a sting into a form field if variables exist


deansaddigh

Recommended Posts

I want to basically but 2 strings into the subject field if a variable exists.

I have the following code

 

<?php 
// check to see if the get variables are empty
//these variables are passed from the quicksearchresults page when some one clicks
//the email image

if(isset($_GET['coursename'] , $_GET['schoolname']))
{
 $coursename =$_GET['coursename'];
 $schoolname =$_GET['schoolname'];
}

?>
      
  <label>Subject :</label>
  <input type="text" name="subject" />
  <br />

 

so basically i just want to put $coursename and $schoolname in the subject field if they exist, how can i do this?

 

Kind regards dean

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.