Mail form Subject Help

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jun 2007
Posts: 211
Reputation: macneato is an unknown quantity at this point 
Solved Threads: 18
macneato's Avatar
macneato macneato is offline Offline
Posting Whiz in Training

Mail form Subject Help

 
0
  #1
Jul 10th, 2008
Hi,

So I'm creating a website for clients that have tons of different courses available, they have opted to not place any course outlines within the site and instead, make the interested party request it via a email.

Now, here is where my problem comes in, I would like to create just one script, that handles all the requests and the subject should just change.

E.g
Excel 2003 Level 1
Excel 2003 Level 2
Excel 2003 Level 3
Excel 2007 Level 1

When the user clicks on Excel 2003 Level 1, i would like a window to popup, with my default form,

<form action="req_out.php" method="post" name="form1" class="course_header style1 style2">
          Request  course outline          
        </form>        </td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#04508E" class="content style1">Email Address :</td>
        <td width="17%" bgcolor="#04508E"><input name="email" type="text" class="content" id="email"></td>
        <td width="10%" bgcolor="#04508E"><span class="content style1">Company :</span></td>
        <td width="17%" bgcolor="#04508E"><input name="company" type="text" class="content" id="company"></td>
        <td width="7%" bgcolor="#04508E"><span class="content style1">Course :</span></td>

 <td width="17%" bgcolor="#04508E"><input name="course" type="text" class="content"></td> -- ?? with the course they just clicked on

I hope any of this made sense if not, please ask and i will try explain better.

I would appreciate any help at all.

Thanks alot.
If this reply solved your problem, please add to my reputation and don't forget to mark this thread as solved.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: Mail form Subject Help

 
0
  #2
Jul 10th, 2008
Tack the course name onto the query string:
<a onclick="window.open('popup.php?course=Excel 2003 Level 1','', 'width=210, height=600, location=no, menubar=no, status=no,toolbar=no, scrollbars=no, resizable=no'); return false" href="">Excel 2003 Level 1</a>
<a onclick="window.open('popup.php?course=Excel 2003 Level 2','', 'width=210, height=600, location=no, menubar=no, status=no,toolbar=no, scrollbars=no, resizable=no'); return false" href="">Excel 2003 Level 2</a>
Then use php in the form:
  1. <?php
  2. $course=$_GET['course'];
  3. ?>
  4. <form action="req_out.php" method="post" name="form1" class="course_header style1 style2">
  5. Request course outline
  6. </form> </td>
  7. </tr>
  8. <tr>
  9. <td width="12%" bgcolor="#04508E" class="content style1">Email Address :</td>
  10. <td width="17%" bgcolor="#04508E"><input name="email" type="text" class="content" id="email"></td>
  11. <td width="10%" bgcolor="#04508E"><span class="content style1">Company :</span></td>
  12. <td width="17%" bgcolor="#04508E"><input name="company" type="text" class="content" id="company"></td>
  13. <td width="7%" bgcolor="#04508E"><span class="content style1">Course :</span></td>
  14.  
  15. <td width="17%" bgcolor="#04508E"><input name="course" type="text" class="content" value="<?php echo $course;?>"></td>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC