Guest Posted March 18, 2006 Posted March 18, 2006 Hi! i have added a questionnaire to my site. When i click submit a thank you page page pops up. I want to add a link on that page. I have tried variations of the following code: echo "<a href="Move Back.mp3"><font face="Arial, Helvetica, sans-serif">Right click and "save target as" to download your FREE BEAT</a>"; When i try this i get an error message saying: syntax error, unexpected T_STRING, expecting ',' or ';' Can someone see anything wrong with this code? I am not a php programmer so i am only guessing that this is how to do it. Thanks! the full code is below if it helps! <html> <head> <title>SSBeats.com - Providing professional quality hip-hop instrumentals</title> </head> <body bgcolor="#000000" text="#FFFFFF" link="#FFCC33"> <p align="center"><img src="catalog/images/oscommerce.gif" width="746" height="133"> </p> <p align="center"><strong><font size="5" face="Arial, Helvetica, sans-serif">SSBeats.com</font></strong></p> <?php if ($submit) { // process form $db = mysql_connect("mysql01.powweb.com", "user","password") or die ("Sorry the sever is temporariliy down at the minute - Please try again later"); mysql_select_db("questionaire",$db); $sql = "INSERT INTO questionaire_table(email,have_you_payed, would_consider_paying,where_did_you_buy,max_willing_to_pay_nonx,max_willing_to_p ay_x,fav_genre, fav_tempo,rating,fav_track_on_site) VALUES ('$email','$have_you_payed','$would_consider_paying', '$where_did_you_buy' ,'$max_willing_to_pay_nonx','$max_willing_to_pay_x','$fav_genre', '$fav_tempo','$rating','$fav_track_on_site')"; $result = mysql_query($sql) or die ("Sorry this email address is already in use - Please select a different one"); echo "<center>Your information has been entered! Thank you for you time.\n</center>"; echo "<a href="Move Back.mp3"><font face="Arial, Helvetica, sans-serif">Right click and "save target as" to download your FREE BEAT</a>"; } else{ // display form ?> <form name="questionaireForm" form method="post" action="<?php echo $PHP_SELF?>"> <p align="center"> </p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif">Email address: <input type="text" name="email" onChange="return ValidateForm()"> </font></p> <p align="center"> <font size="2" face="Arial, Helvetica, sans-serif"> <label>Have you ever payed for Hip-Hop beats / instrumentals before? </label> <label> <select name="have_you_payed"> <option>YES</option> <option>NO</option> </select> </label> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif">Would you consider paying for Hip-Hop beats / instrumentals? <select name="would_consider_paying"> <option>YES</option> <option>NO</option> </select> <label></label> </font></p> <p align="center"> <font size="2" face="Arial, Helvetica, sans-serif"> <label></label> <label>If you have payed for instrumentals previously then where did you buy these instrumentals? <input type="text" name="where_did_you_buy"> </label> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif">What is the maximum amount you would be willing to pay for a <strong>non-exclusive</strong> beat / instrumental? <select name="max_willing_to_pay_nonx"> <option>$10 / £6</option> <option>$20 / £12 </option> <option>$30 / £17</option> <option>$40 / £23</option> <option>$50 / £29</option> <option>$60 / £35</option> <option>$70 / £41</option> <option>$80 / £46</option> <option>$90 / £52</option> <option>$100 / £58</option> <option>MORE</option> </select> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif"> What is the maximum amount you would be willing to pay for an <strong>exclusive</strong> beat / instrumental? <select name="max_willing_to_pay_x"> <option>LESS THAN $100 / £58</option> <option>$100 / £60</option> <option>$200 / £170</option> <option>$300 / £230</option> <option>$400 / £290</option> <option>$500 / £350</option> <option>$600 / £410</option> <option>$700 / £460</option> <option>$800 / £520</option> <option>$900 / £580</option> <option>MORE</option> </select> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif">What style / genre of Hip-Hop do you listen to the most? <select name="fav_genre"> <option>Alternative</option> <option>Hardcore</option> <option>G-funk</option> <option>Dirty South </option> <option>Crunk</option> <option>Turntablism </option> <option>Old School</option> <option>New School</option> <option>Other</option> </select> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif">What tempo would you consider to be the best tempo for a Hip-Hop track? <select name="fav_tempo"> <option>70 - 80 bpm</option> <option>80 - 90 bpm</option> <option>90 - 100 bpm</option> <option>100 - 110 bpm </option> <option>110 - 120 bpm</option> <option>120 - 130 bpm</option> <option>130 - 140 bpm</option> <option>140 +</option> </select> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif"><strong>Please preview some of our beats at the following address in order to complete the rest of the questionnaire :-</strong></font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif"><strong><a href="index.htm" target="_blank">CLICK HERE AND FOLLOW THE LINK TO PREVIEW BEATS</a></strong></font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif"> How would you rate the scale of professionalism of our beats/ instrumentals? <select name="rating"> <option>1 = poor</option> <option>2</option> <option>3 = average</option> <option>4</option> <option>5 = Very Professional</option> </select> <br> </font></p> <p align="center"><font size="2" face="Arial, Helvetica, sans-serif"> Please select the number of your favourite track from those which you listened to:</font> <select name="fav_track_on_site"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20</option> <option>21</option> <option>22</option> <option>23</option> <option>24</option> <option>25</option> <option>26</option> <option>27</option> <option>28</option> <option>29</option> <option>30</option> <option>31</option> <option>32</option> </select> </p> <p align="center"> </p> <center> <p> <input type="Submit" name="submit" value="submit"> </p> </center> </form> <p align="center"> </p> <script language = "Javascript"> /** * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/) */ function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(at,(lat+1))!=-1){ alert("Invalid E-mail ID") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID") return false } return true } function ValidateForm(){ var emailID=document.questionaireForm.email if ((emailID.value==null)||(emailID.value=="")){ alert("Please Enter your Email ID") emailID.focus() return false } if (echeck(emailID.value)==false){ emailID.value="" emailID.focus() return false } return true } </script> <?php } // end if ?> </body> </html>
Guest Posted March 19, 2006 Posted March 19, 2006 Please anyone! i have recently launched a marketing campaign and i really need this feature to be active on my site as soon as poss! Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.