Jump to content

rocky48

Members
  • Posts

    261
  • Joined

  • Last visited

Everything posted by rocky48

  1. I am trying to write some code to display the visits to my site each week in batches of 13 weeks (1 quarter). I am getting the Week No and the number of hits, but the actual date, which is in a separate table is not being displayed. I have tried LEFT JOIN and INNER Join and even RIGHT JOIN (this only displays the Date). I can't see where I am going wrong! Here is the code: <? include('connect_visits.php'); doDB7(); $limitStart = $_POST['QUARTER'] - 13; $Visit_data="SELECT Visits.ID, Visits.WVisits, Visits.WCom, WeekNo.WNo, WeekNo.WCom FROM Visits LEFT JOIN WeekNo ON Visits.ID = WeekNo.WCom ORDER BY Visits.ID LIMIT {$limitStart}, 13"; $Visit_data_res = mysqli_query($mysqli, $Visit_data) or die(mysqli_error($mysqli)); $display_block = " <table width=\"20%\" cellpadding=\"3\" cellspacing=\"1\" border=\"1\" BGCOLOR=\"white\" > <tr> <th>Week No</th> <th>Week Commencing</th> <th>Visits</th> </tr>"; while ($C_info = mysqli_fetch_array($Visit_data_res)) { $Cid = $C_info['ID']; $Visits = ($C_info['WVisits']); $WeekNo = ($C_info['WCom']); //add to display $display_block .= " <tr> <td width=\"1%\" valign=\"top\">".$Cid."<br/></td> <td width=\"8%\" valign=\"top\">".$WeekNo."<br/></td> <td width=\"5%\" valign=\"top\">".$Visits."<br/></td> </td></tr>"; } mysqli_free_result($Visit_data_res); ?> Where am I going wrong?
  2. Thanks for the help! I did change the rows part to 13, as when I choose 2nd and 3rd quarter the rest of the year data.
  3. I have got a set of data for a country for each week of the year, but want to display the data a quarter at a time, using a form which posts a value into LIMIT, which was OK for the 1st quarter, but for subsequent quarters I needed to use LIMIT in the form LIMIT start, rows. I found by experiment that this had to be the last statement in the query. when I added the start I got an error: Parse error: syntax error, unexpected ',' in /homepages/43/d344817611/htdocs/Admin/Visitdata.php on line 10 Here is the SQL part of my code: $Visit_data="SELECT WeekNo.WNo, WeekNo.WCom, Countries.Country, ctryvisits.CVisits FROM ctryvisits LEFT JOIN Countries ON ctryvisits.country=Countries.CID LEFT JOIN WeekNo ON ctryvisits.WNo=WeekNo.WNo WHERE Countries.Country = '".$_POST["Country"]."' ORDER BY ctryvisits.WNo LIMIT '".$_POST["QUARTER"]."'" - 13, '".$_POST["QUARTER"]."'"; Is this the best way of doing what I require or is there an easier way of achieving what I want?
  4. Right! now the silly errors are out of the way. I have tested the script! It's not working! All I get is a Submit button, but no data. I am unfamiliar with the function and the use of the FOREACH constuct. looking at the PHP manual there are two syntaxes. It appears that Psyhco has used the second form where the current element's key is assigned to $key variable for each itteration. foreach (array_expression as $key => $value The 2 variables he used are $id and $label I assume that the line: $optionsHTML = ''; is the array built from the expression: $optionsHTML .= "<option value='{$id}'>{$label}</option>\n"; Because I was not familiar with the PDO method, but have used mysqli, I had to rewrite the data retrival part which I believe is OK. I guess that the line : $countryOptions = buildSelectOptions($countries); is used in conjunction with the function to build the array. The HTML part that Psycho wrote puts the variable into the Form format for a selection list. Why is the $optionsHTML also inclosed in the option tags? Have I got the HTML part correct or is it the data extraction part that is incorrect? Here is the code: <? include("AddStats_admin_connect.php"); //connect to database doDB(); //Function to build select options based on passed array function buildSelectOptions($options) { $optionsHTML = ''; foreach($options as $id => $label) { $optionsHTML .= "<option value='{$id}'>{$label}</option>\n"; } return $optionsHTML; } //Run query to get the ID and Name from the table //Then populate into an array $clist_sql = "SELECT CID, Country FROM Countries"; $clist_res= mysqli_query($mysqli, $clist_sql) or die(mysqli_error($mysqli)); if (mysqli_num_rows($clist_res) < 1) { //this Country not exist $display_block = "<p><em>You have selected an invalid Country.<br/> Please try again.</em></p>"; } $countries = array(); while($Ctry_info = mysqli_fetch_array($clist_res)) { $countries[$Ctry_info['CID'] = $Ctry_info['Country']]; } $countryOptions = buildSelectOptions($countries); ?> <!DOCTYPE html> <html lang="en"> <head> <title>Stats</title> <link rel="stylesheet" href="stylesheets/style.css" /> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <? echo $countryOptions; ?> </br></br></br></br></br></br></br></br> <!Later in the HTML for the page <form action="Ctrystats.php" method="post"> <option name="country" value=<? echo $countryOptions;?>Country</option></br></br> <input type="submit" value="Submit Choice"> </form></p> </body> </html> I think I am nearly there so I would appreciate some help to finish this coding.
  5. Sorry guys! My sight must be failing! I must getting too old for this game. Did not spot the stray [ bracket without its partner.
  6. Thank you for your help! Changing that removed the foreach error. However I still have another problem with the code you gave. I get this error: Parse error: syntax error, unexpected ';', expecting ']' in /homepages/43/d344817611/htdocs/Admin/CountryOptions.php on line 27 Here is the code so far: <? include("AddStats_admin_connect.php"); //connect to database doDB(); //Function to build select options based on passed array function buildSelectOptions($options) { $optionsHTML = ''; foreach($options as $id => $label) { $optionsHTML .= "<option value='{$id}'>{$label}</option>\n"; } return $optionsHTML; } //Run query to get the ID and Name from the table //Then populate into an array $clist_sql = "SELECT CID, Country FROM Countries"; $clist_res= mysqli_query($mysqli, $clist_sql) or die(mysqli_error($mysqli)); if (mysqli_num_rows($clist_res) < 1) { //this Country does not exist $display_block = "<p><em>You have selected an invalid Country.<br/> Please try again.</em></p>"; } $countries = array(); while($Ctry_info = mysqli_fetch_array($clist_res)) { $countries[$Ctry_info['CID'] = $Ctry_info['Country']; } $countryOptions = buildSelectOptions($countries); <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="Description" content="Ecologic Theme"> <meta name="author" content="CoffeeCup Software, Inc."> <meta name="Copyright" content="Copyright (c) 2011 CoffeeCup, all rights reserved."> <title>Stats</title> <link rel="stylesheet" href="stylesheets/default.css" /> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <!Later in the HTML for the page <option name="country"> <?php echo $countryOptions; ?> </option> </body> </html> I can't spot any missing semi-colons or quotes, so what is causing this error?
  7. Hi Psycho I foolishly used MS Word (a thing I have never done before). I did not know there was a difference, but thats MS for you. It now does not like the foreach line and gives this error: Warning: Invalid argument supplied for foreach() in /homepages/43/d344817611/htdocs/Admin/CountryOptions.php on line 9 I am not sure when to go from here?
  8. Thank you! I have changed it to mysqli: //Function to build select options based on passed array function buildSelectOptions($options) { $optionsHTML = ''; foreach($options as $id => $label) { $optionsHTML .= "<option value='{$id}'>{$label}</option>\n"; } return $optionsHTML; } //Run query to get the ID and Name from the table //Then populate into an array $clist_sql = ”SELECT CID, Country FROM Countries”; <<This line errors>> $clist_res= mysqli_query($mysqli, $clist_sql) or die(mysqli_error($mysqli)); if (mysqli_num_rows($clist_res) < 1) { //this Country not exist $display_block = "<p><em>You have selected an invalid Country.<br/> Please try again.</em></p>"; } while($Ctry_info = mysqli_fetch_array($clist_res)) { $Ctry_ID = ($Ctry_info['CID']); $Ctry_Name = ($Ctry_info['Country']); } //Create select list options $countryOptions = buildSelectOptions($countries); ?> However I am getting a T_STRING error on line 18 Parse error: syntax error, unexpected T_STRING in /homepages/43/d344817611/htdocs/Admin/CountryOptions.php on line 18 I have checked the usual suspects, missing quotes or semi-colon, but I can't see any thing wrong. What am I missing?
  9. Hi Psycho I have not looked at this code until now but I can't get it to work. I get the following error: Fatal error: Call to a member function query() on a non-object in /homepages/43/d344817611/htdocs/Admin/CountryOptions.php on line 18 <? include("AddStats_admin_connect.php"); //connect to database doDB(); //Function to build select options based on passed array function buildSelectOptions($options) { $optionsHTML = ''; foreach($options as $id => $label) { $optionsHTML .= "<option value='{$id}'>{$label}</option>\n"; } return $optionsHTML; } //Run query to get the ID and Name from the table //Then populate into an array $sth = $dbh->query('SELECT CID, Country FROM Countries'); $sth ->setFetchMode(PDO::FETCH_ASSOC); $countries = array(); while($row = $sth->fetch()) { $countries[$row['CID']] = $row['Country']; } //Create select list options $countryOptions = buildSelectOptions($countries); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="Description" content="Ecologic Theme"> <meta name="author" content="CoffeeCup Software, Inc."> <meta name="Copyright" content="Copyright (c) 2011 CoffeeCup, all rights reserved."> <title>Stats</title> <link rel="stylesheet" href="stylesheets/default.css" /> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> //Later in the HTML for the page <option name="country"> <?php echo $countryOptions; ?> </option> </body> I have changed the column names to suit my database viz CID, Country and Countries. I normally use mysqli queries, but you seem to have used mysql! I am not very familar with mysql and I am getting on in years, so your help would be appreciated. NOTE it is line 19 in the code submitted.
  10. I have a simple database table that has the names of countries listed with just 2 fields ID & country. I want to use this in a form to choose the country and provide statistics regarding that country. I know how to get the data from MySQL, but I don't know how I can use this in the form as a selection? How do I get the options to iterate all of the countries so that when the form is displayed a combo type box is displayed with a dropdown list? I have not shown any code as I am not sure if this is possible. Please can anyone advise if this is possible and if so some example code?
  11. Did as you said but had no effect? I researched the internet and one suggestion was to add <div> tag inside <th> and define width inside the <div> tag. Viz. <th><div style="width:120px">Week #</div></th> This now works!
  12. I am trying to set the column widths in my HTML 5 script, but what ever I do the widths stay the same? I found that the <col width=""> tag does not work in HTML 5. So I tried <th style="width:130px">Week #</th> and this did not work. I have also created a special table div style #table1. Nothing changes when I make these changes! Here is the table part of my script: <div id="table1"> <table width="250%" cellspacing="1" border="1" BGCOLOR="white"> <tr> <th style="width:130px">Week #</th> <th style="width:80px">18</th> <th style="width:80px">19</th> <th style="width:80px">20</th> <th style="width:80px">21</th> <th style="width:80px">22</th> <th style="width:80px">23</th> <th style="width:80px">24</th> <th style="width:80px">25</th> <th style="width:80px">26</th> </tr> <tr> <td>Visits</td> <td>300</td><td>346</td><td>266</td><td>216</td><td>339</td><td>288</td><td>231</td><td>213</td><td></td></tr> <tr> <td>From</td> <td>28/04/2014</td><td>05/05/2014</td><td>12/05/2014</td><td>19/05/2014</td><td>26/05/2014</td><td>02/06/2014</td><td>09/06/2014</td><td>16/06/2014</td><td>23/06/2014</td> </tr> <tr> <td>To</td> <td>04/05/2014</td><td>11/05/2014</td><td>18/05/2014</td><td>25/05/2014</td><td>01/06/2014</td><td>08/06/2014</td><td>15/06/2014</td><td>22/06/2014</td><td>29/06/2014</td> </tr> <tr> <td>USA</td><td>161</td><td>158</td><td>148</td><td>79</td><td>132</td><td>105</td><td>81</td><td>70</td><td></td> etc......... </table> </div> here is my style.css script: /* Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License */ body { margin: 0; padding: 0; background: #F1F1F1 url(images/img01.gif) repeat-x left top; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: black; } quote { font-size:medium; } h1, h2, h3 { margin: 0; padding: 0; font-weight: normal; color: #023848; } h1 { font-size: 4em; } h2 { font-size: 2.4em; } h3 { font-size: 1.6em; } p, ul, ol { margin-top: 0; line-height: 180%; } ul, ol { font-size:large; } ul.a { list-style-type:circle; } ul.b { list-style-type:square; } ol.c { list-style-type:upper-roman; } ol.d { list-style-type:lower-alpha; } a { text-decoration: none; color: #4486C7; } p { font-size:large; } a:hover { } #wrapper { width: 980px; margin: 0 auto; padding: 0; } /* Header */ #header { width: 980px; height: 280px; margin: 0 auto; padding: 0px; background: url(images/head!.png) no-repeat left top; } /* Logo */ #logo { float: right; margin: 0; padding: 0; } #logo h1, #logo p { margin: 0; padding: 10px; } #logo h1 { float: left; padding-top: 223px; letter-spacing: -1px; text-align: right; text-transform: capitalize; font-size: 3.8em; color: purple; } #logo p { float: left; margin: 0; padding: 250px 0 0 10px; font: normal 20px Arial, Helvetica, sans-serif; font-style: italic; color: purple; } #logo a { border: none; background: none; text-decoration: none; color: black; } /* Search */ #search { float: right; width: 280px; height: 60px; padding: 20px 0px 0px 0px; background: #E2E2E2; border-bottom: 4px solid #FFFFFF; } #search form { height: 41px; margin: 0; padding: 10px 0 0 20px; } #search fieldset { margin: 0; padding: 0; border: none; } #search-text { width: 170px; padding: 6px 5px 2px 5px; border: 1px solid #DEDEDE; background: #FFFFFF; text-transform: lowercase; font: normal 11px Arial, Helvetica, sans-serif; color: #5D781D; } #search-submit { width: 50px; height: 22px; border: none; background: #B9B9B9; color: #000000; } /* Menu */ #menu { width: 980px; height: 90px; margin: 0 auto; padding: 0; } #menu ul { margin: 0; padding: 50px 0px 0px 0px; list-style: none; line-height: normal; } #menu li { float: left; } #menu a { display: block; width: 100px; height: 30px; margin-right: 1px; padding: 9px 0px 0px 0px; background: url(images/img02.gif) no-repeat left top; text-decoration: none; text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; color: #FFFFFF; border: none; } #menu a:hover, #menu .current_page_item a { text-decoration: none; } #menu .current_page_item a { padding-left: 0; } /* Page */ #page { width: 940px; margin: 0 auto; padding: 0px 0px 0px 40px; background: url(images/img03.gif) repeat-y left top; } #page-bgtop { padding: 20px 0px; } #page-bgbtm { } /* Content */ #content { float: left; width: 580px; padding: 30px 0px 0px 0px; } .post { background: url(images/img07.gif) no-repeat left 50px; margin-bottom: 15px; } .post-bgtop { } .post-bgbtm { } .post .title { height: 38px; margin-bottom: 10px; padding: 12px 0 0 0px; letter-spacing: -.5px; color: #000000; } .post .title a { color: #023848; border: none; } .post .meta { margin-bottom: 30px; padding: 5px 0px 15px 0px; text-align: left; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; } .post .meta .date { float: left; } .post .meta .posted { float: right; } .post .meta a { } .post .entry { background: url(images/img08.gif) no-repeat left top; padding: 0px 0px 20px 0px; padding-bottom: 20px; text-align: justify; } .links { padding-top: 20px; font-size: 12px; font-weight: bold; } /* Sidebar */ #sidebar { float: right; width: 280px; margin: 0px; padding: 0px 20px 0px 0px; color: lightgray; } #sidebar ul { margin: 0; padding: 0; } #sidebar li { margin: 0; padding: 0; } #sidebar li ul { margin: 0px 0px; padding-bottom: 30px; } #sidebar li li { line-height: 35px; border-bottom: 1px dashed #D1D1D1; margin: 0px 30px; border-left: none; } #sidebar li li span { display: block; margin-top: -20px; padding: 0; font-size: 11px; font-style: italic; } #sidebar h2 { height: 38px; padding-left: 30px; letter-spacing: -.5px; font-size: 1.8em; } #sidebar p { margin: 0 0px; padding: 0px 30px 20px 30px; text-align: justify; } #sidebar a { border: none; } #sidebar a:hover { text-decoration: underline; color: #8A8A8A; } /* Calendar */ #calendar { } #calendar_wrap { padding: 20px; } #calendar table { width: 100%; } #calendar tbody td { text-align: center; } #calendar #next { text-align: right; } #dtable { font-size:small; color:black; } #dtable>h1 { background: #F1F1F1; } #table { font-size:small; color:black; text-align:center; width:200px; } #table1 { font-size:small; color:black; text-align:center; width:200px; border: 1px solid black; table-layout: fixed; } th, td { border: 1px solid black; overflow:hidden; width: 100px; } /* Footer */ #footer { height: 50px; margin: 0 auto; padding: 0px 0 15px 0; background: #ECECEC; border-top: 1px solid #DEDEDE; font-family: Arial, Helvetica, sans-serif; } #footer p { margin: 0; padding-top: 20px; line-height: normal; font-size: 9px; text-transform: uppercase; text-align: center; color: #A0A0A0; } #footer a { color: #8A8A8A; } I am completely baffled as to why the widths of the columns does not change when I try to fix the widths. They are all the same size? Please enlighten me where I am going wrong?
  13. I have just upgraded PHP on my ISP server and none of the php scripts work. I was using 5.2. And I am now on 5.4. Why would the scripts stop working? Are there and patches or changes I need to make to make them work? I need an answer urgently!
  14. Thanks again jazzman1! I am now trying to learn jQuery. It's very powerful scripting language. The solution: <script> $( "#questionnaire" ).validate({ rules: { rate: { required: true }, Vimp: { required: true }, email: { required: true, email: true }, site: { required: true }, Simp: { required: true }, other: { required: true } } }); </script>
  15. I am trying to find a way to check if a user has already entered their email address in my MySQL database. If they have an entry then it jumps to another script that avoids the questionnaire, but if they have no entry, then they do the questionnaire. I have tried using but I get this error warning: The script I am using: <?php include('questionnaire_connect.php'); doDB12(); if ($_POST["email"] == "") { header("Location: emailChecker.html"); exit; } else { //check that email is in list emailChecker($_POST["email"]); //get number of results and do action if (mysqli_num_rows($check_res) < 1) { //free result mysqli_free_result($check_res); header('Location: /questionnaire.html'); }else { header('Location: /Alt_inputform.html'); } } //close connection to MySQL mysqli_close($mysqli); ?> The emailChecker is a function in the DB connect script: function emailChecker($email) { global $mysqli, $check_res; //check that email is not already in list $check_sql = "SELECT id FROM questionnaire WHERE email = '".$email."'"; $check_res = mysqli_query($mysqli, $check_sql) or die(mysqli_error($mysqli)); } Is there another way I can redirect the program flow other than using Header?
  16. Hi Jazzman Forgot <script> tag. It seemed to work, but when it got to the site rating radio buttons it would not accept that one had been selected. Do I need different code for this type of input?
  17. Hi Jazzman1 Found this Js Function code on the internet, but was only evalueating one field. Have I got the sytax right for multiple fields? function validateForm() { var a=document.forms["feedback"]["email"].value; if (a==null || a=="") { alert("Email address must be entered"); return false; } var b=document.forms["feedback"]["rate"].value; if (b==null || b=="") { alert("A Site Rating must be entered"); return false; } var c=document.forms["feedback"]["Vimp"].value; if (c==null || c=="") { alert("Your Verses Utility improvement comments must be entered"); return false; } var d=document.forms["feedback"]["site"].value; if (d==null || d=="") { alert("Your site comments must be entered"); return false; } var e=document.forms["feedback"]["Simp"].value; if (e==null || e=="") { alert("Your site improvement comments must be entered"); return false; } var f=document.forms["feedback"]["other"].value; if (f==null || f=="") { alert("Your other comments must be entered"); return false; } } To use it according to the snippet you add ' onsubmit="return validateForm()" ' to the form. It did not work, just went to the action file, with no data entered into the form.
  18. Hi Jazzman1 Have you an example of the javascript code that will evalueate the form? Does this go on the form page?
  19. Jacques1 - I rerally don't understand what you are getting at? How else am I going to check if the user has completely filled in the form (Apartr from Isset())? I have corrected the form now as you have pointed out the mistakes. How about helping by giving me some clues to solve the orginal question? - How do you return to the form if any of the fields has not been filled in? Here is the php code: <?php session_start(); $_SESSION['Test']=$_POST['VID']; print_r ($_POST); $mail = $_POST['email']; $Vrate = $_POST['rate']; $Verse_imp = $_POST['Vimp']; $site_sug = $_POST['site']; $Site_imp = $_POST['Simp']; if (empty($mail)) { echo '$mail is either 0, empty, or not set at all'; } elseif (require('VInput.php')); if (empty($Vrate)) { echo '$Vrate is either 0, empty, or not set at all'; } elseif (require('VInput.php')); if (empty($Verse_imp)) { echo '$Verse_imp is either 0, empty, or not set at all'; } elseif (require('VInput.php')); if (empty($site_sug)) { echo '$site_sug is either 0, empty, or not set at all'; } elseif (require('VInput.php')); if (empty($Site_imp)) { echo '$Site_imp is either 0, empty, or not set at all'; } elseif (require('VInput.php')); ?> I have since added the elseif to make it run the next code if the form has been completely filled in. Here is the form: <div id="content"><!--Start Content--> <h1>Feedback Questionnaire</h1> <p>We are sorry that we have had to resort to this method of getting feedback, but users seem reluctant to give any feedback. We can tell from our stats that there is a very strong contingent in California, USA and we would like to get your opinion of our site and the FREE verse utility. We would also value your opinion elsewhere in the world.<br /> All questions must be answered before you proceed to the normal input form. </p> </br> <p> <form NAME=feedback action="Qstore.php" method="post"> <strong>Your email address:</strong> <input type="email" size="20" name="email"/><br/><br/> Please rate the Verse Utility</br> <input type="radio" name="rate" value="1"> 1 <input type="radio" name="rate" value="2"> 2 <input type="radio" name="rate" value="3"> 3 <input type="radio" name="rate" value="4"> 4 <input type="radio" name="rate" value="5"> 5 <br/><br/> <strong>Are there any ways we can improve the utility?:</strong> <br/><textarea name="Vimp" rows="5" cols="30"></textarea><br/><br/> <strong>What do you think of the site as a whole?:</strong> <br/><textarea name="site" rows="5" cols="30"></textarea><br/><br/> <strong>How do you think we can improve the site?:</strong> <br/><textarea name="Simp" rows="5" cols="30"></textarea><br/><br/> <strong>Any other comments?:</strong> <br/><textarea name="Simp" rows="5" cols="30"></textarea><br/><br/> <input type="submit" value="Submit"/> </form> </p> </div><!-- end content --> I have changed the checkboxes to radio buttons as |I only want one checked. Please help.
  20. I admit to the first mistake and the missing form tag, but I thought empty checks whether the variable has a value. If you don't fill this value in the form this would surely be a null value? I agree with removing the variables and using the POSTed ones. Apart from picking holes in my coding, nobody has attempted to answer my question!!
  21. The above is when form is empty. Here is the output when filled in: Array ( => another@gmail.com [rate] => 5 [Vimp] => Yes [site] => Rubbish [simp] => None => ) $mail is either 0, empty, or not set at all
  22. This is the print_r output Array ( => [Vimp] => [site] => [simp] => => ) $mail is either 0, empty, or not set at all$Vrate is either 0, empty, or not set at all$Verse_imp is either 0, empty, or not set at all$site_sug is either 0, empty, or not set at all$Site_imp is either 0, empty, or not set at all
  23. Hi Here is the html form: <?php session_start(); $_SESSION['Test']=$_POST['VID']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License Name : Yosemite Description: A two-column, fixed-width design with dark color scheme. Version : 1.0 Released : 20091106 --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>1066 Cards 4U - Questionnaire</title> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"><!--Start Wrapper--> <div id="menu"><!--Start Menu--> <ul> <li class="current_page_item"><a href="index.php">Home</a></li> <li><a href="Links.html">Links</a></li> <li><a href="Verse_Menu.html">Verses</a></li> <li><a href="Techniques.html">Techniques</a></li> <li><a href="News.html">News</a></li> <li><a href="Gallery.html">Gallery</a></li> <li><a href="contact.html">Contact</a></li> <li><a href="stats1.html">Stats</a></li> </ul> </div><!-- end menu --> <div id="header"><!--Start Header--> <div id="logo"> <h1><a href="http://www.1066cards4u.co.uk">1066 Cards 4U</a></h1> </div><!-- end wrapper --> </div><!-- end header --> <div id="page"><!--Start Page--> <div id="page-bgtop"><!--Start Page-bgtop--> <div id="page-bgbtm"><!--Start Page-bgbtm--> <div id="content"><!--Start Content--> <h1>Feedback Questionnaire</h1> <p>We are sorry that we have had to resort to this method of getting feedback, but users seem reluctant to give any feedback. We can tell from our stats that there is a very strong contingent in California, USA and we would like to get your opinion of our site and the FREE verse utility. We would also value your opinion elsewhere in the world.<br /> All questions must be answered before you proceed to the normal input form. </p> </br> <p> <form NAME=feedback action="Qstore.php" method="post"> <strong>Your email address:</strong> <input type="email" size="20" name="email"/><br/><br/> Please rate the Verse Utility</br> <input type="checkbox" name="rate" value="1"> 1 <input type="checkbox" name="rate" value="2"> 2 <input type="checkbox" name="rate" value="3"> 3 <input type="checkbox" name="rate" value="4"> 4 <input type="checkbox" name="rate" value="5"> 5 <br/><br/> <strong>Are there any ways we can improve the utility?:</strong> <br/><textarea name="Vimp" rows="5" cols="30"></textarea><br/><br/> <strong>What do you think of the site as a whole?:</strong> <br/><textarea name="site" rows="5" cols="30"></textarea><br/><br/> <strong>How do you think we can improve the site?:</strong> <br/><textarea name="Simp" rows="5" cols="30"></textarea><br/><br/> <strong>Any other comments?:</strong> <br/><textarea name="Simp" rows="5" cols="30"></textarea><br/><br/> <input type="submit" value="Submit"/> </p> </div><!-- end content --> <div id="sidebar"><!--Start Sidebar--> <div id="search" <!--Start Search--> <form method="get" action="http://1066cards4u.co.uk"> <div><!--Start Submit--> <input type="text" name="s" id="search-text" value="" /> <input type="submit" id="search-submit" value="GO" /> </div><!-- end submit --> </form> </div><!-- end Search --> <div style="clear: both;"> </div> </div><!-- end #sidebar --> <div style="clear: both;"> </div> </div><!-- end page-bgtop --> </div><!-- end page-bgbtm --> </div><!-- end page --> </div> <div id="footer"><!--Start Footer--> <p>Copyright (c) 2008 Sitename.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/" rel="nofollow">FreeCSSTemplates.org</a>.</p> </div><!-- end footer --> </body> </html> Also, when this form has been filled in correctly I want to proceed to another php script. What I am doing is trying to force users to fill the questionnaire, as I have slipped this in between a set of scripts.
×
×
  • 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.