SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Insert Record, After Updating Problem in Dreamweaver

    Hi All,

    Hope someone can help with this. I'm new to PHP but was getting along just fine until i hit this problem.

    On the Insert Record behaviour, the Goto After Inserting does not forward to the 'Thanks' page, it merely inserts the record and displays a new instance of the same page. We want it to go to the 'Thanks'

    Thanks in advance for any help.

    Dave

    Here is my code

    PHP Code:
    <?php require_once('Connections/dbo117052341.php'); ?> <?php
    function GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      
    $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

      switch (
    $theType) {
        case 
    "text":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;    
        case 
    "long":
        case 
    "int":
          
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case 
    "double":
          
    $theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
          break;
        case 
    "date":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;
        case 
    "defined":
          
    $theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
          break;
      }
      return 
    $theValue;
    }

    $editFormAction $HTTP_SERVER_VARS['PHP_SELF'];
    if (isset(
    $HTTP_SERVER_VARS['QUERY_STRING'])) {
      
    $editFormAction .= "?" $HTTP_SERVER_VARS['QUERY_STRING'];
    }

    if ((isset(
    $HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form1")) {
      
    $insertSQL sprintf("INSERT INTO Student (Title, FirstName, Surname, AddressLine1, AddressLine2, AddressLine3, County, PostCode, HomeTelephone, MobileNumber, DOBDD, DOBMM, DOBYY, Nationaility, LearningDisability, Gender, StartDateID, EmpDetails, SpecialNeeds, MedicalConditions, MaritalStatus) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           
    GetSQLValueString($HTTP_POST_VARS['Title'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Forename'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Surname'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Address1'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Address2'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Town'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['County'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['PostCode'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['HomeNo'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['MobileNo'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['DOB_Date'], "int"),
                           
    GetSQLValueString($HTTP_POST_VARS['DOB_Mth'], "int"),
                           
    GetSQLValueString($HTTP_POST_VARS['DOB_Yr'], "int"),
                           
    GetSQLValueString($HTTP_POST_VARS['Nationality'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['DisabilityAct'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['Gender'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['textfield'], "int"),
                           
    GetSQLValueString($HTTP_POST_VARS['EmpDetails'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['SpecialNeed'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['MedicalCondition'], "text"),
                           
    GetSQLValueString($HTTP_POST_VARS['MaritalStatus'], "text"));

      
    mysql_select_db($database_dbo117052341$dbo117052341);
      
    $Result1 mysql_query($insertSQL$dbo117052341) or die(mysql_error());

      
    $insertGoTo "/ThanksPage.php";
      if (isset(
    $HTTP_SERVER_VARS['QUERY_STRING'])) {
        
    $insertGoTo .= (strpos($insertGoTo'?')) ? "&" "?";
        
    $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
      }
      
    header(sprintf("Location: %s"$insertGoTo));
    }

    mysql_select_db($database_dbo117052341$dbo117052341);
    $query_Annoucements "SELECT * FROM Annoucements WHERE Annoucements.Code = 1 AND Annoucements.PublishDate <= Now() AND Annoucements.ExpiryDate >=Now() ORDER BY Annoucements.`Sequence`";
    $Annoucements mysql_query($query_Annoucements$dbo117052341) or die(mysql_error());
    $row_Annoucements mysql_fetch_assoc($Annoucements);
    $totalRows_Annoucements mysql_num_rows($Annoucements);

    $colname_ChosenCourse "0";
    if (isset(
    $HTTP_GET_VARS['StartDateId'])) {
      
    $colname_ChosenCourse = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['StartDateId'] : addslashes($HTTP_GET_VARS['StartDateId']);
    }
    mysql_select_db($database_dbo117052341$dbo117052341);
    $query_ChosenCourse sprintf("SELECT Courses.Name, Courses.`Time`, Courses.DayofWeek, Courses.LocID, Locations.LocName, StartDate.StartDate, Courses.CourseID, StartDate.CourseID, StartDate.StartDateID FROM StartDate, Courses, Locations WHERE StartDateID = %s and Courses.CourseID = StartDate.CourseID and  Courses.LocId = Locations.LocId"$colname_ChosenCourse);
    $ChosenCourse mysql_query($query_ChosenCourse$dbo117052341) or die(mysql_error());
    $row_ChosenCourse mysql_fetch_assoc($ChosenCourse);
    $totalRows_ChosenCourse mysql_num_rows($ChosenCourse);
       

              
    /* Close SQL-connection */ 
              
    MYSQL_CLOSE();
             
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <TITLE>Southam College - Course Enrolment</TITLE>
    <style>
        a, A:link, a:visited, a:active
            {color: #0000aa; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
        A:hover
            {color: #ff0000; text-decoration: none; font-family: Tahoma, Verdana; font-size: 11px}
        p, tr, td, ul, li
            {color: #000000; font-family: Tahoma, Verdana; font-size: 11px}
        form
            {margin: 5px;}
        .header1, h1
            {color: #ffffff; background: #4682B4; font-weight: bold; font-family: Tahoma, Verdana; font-size: 13px; margin: 0px; padding: 2px;}
        .header2, h2
            {color: #000000; background: #DBEAF5; font-weight: bold; font-family: Tahoma, Verdana; font-size: 12px;}
        .intd
            {color: #000000; font-family: Tahoma, Verdana; font-size: 11px; padding-left: 15px;}

    .blocklink a {
        font-family: Tahoma;
        font-size: small;
        font-weight: bold;
        background-position: left;
        font-style: normal;
        background-color: #FFFFFF;
        color: #000000;
    }
    .blocklink a:link {
        color: #000000;
        background-color: #FFFFFF;
        font-family: Tahoma;
        font-size: small;
        font-weight: bold;
        background-position: left;
    }
    .blocklink a:hover{
        color: #FFFFFF;
        background-color: #33CC99;
        font-family: Tahoma;
        font-size: small;
        font-weight: bold;
        background-position: left;
    }

    </style>
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="5">
    <table width="770" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr> 
        <td width="5" rowspan="3" bgcolor="#CCCCCC">&nbsp;</td>
        <td width="5" rowspan="3" bgcolor="#009966">&nbsp;</td>
        <td width="5" rowspan="3" bgcolor="#CCCCCC">&nbsp;</td>
        <td height="100"><table width="740" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <td width="132" height="95"><img src="/Images/SouthamCollegeTitle1..gif" width="132" height="68"></td>
              <td width="503"><table width="400" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr> 
                    <td width="100"><div align="center"></div></td>
                    <td width="100"><div align="center"></div></td>
                    <td width="100"><div align="center"></div></td>
                    <td width="100"><div align="center"></div></td>
                  </tr>
                </table>
                <div align="center"></div></td>
              <td width="83"><div align="center"><img src="/Images/littleLogo.jpg" width="75" height="87"></div></td>
              <td width="2">&nbsp;</td>
            </tr>
            
          </table></td>
        <td width="5" rowspan="3" bgcolor="#CCCCCC">&nbsp;</td>
        <td width="5" rowspan="3" bgcolor="#009966">&nbsp;</td>
        <td width="5" rowspan="3" bgcolor="#CCCCCC">&nbsp;</td>
      </tr>
      <tr>
        <td height="99%" valign="top" class="blocklink"><div align="center"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="5" bgcolor="#CCCCCC"></td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellpadding="0" cellspacing="5" bgcolor="#009966">
                    <tr>
                      <td><strong><font color="#FFFFFF" size="4" face="Tahoma">Online Application 
                        Form for Community Education Centre</font></strong></td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td height="5" bgcolor="#CCCCCC"></td>
              </tr>
            </table>
            <form action="<?php echo $editFormAction?>" name="form1" method="POST">
              <table width="100%" border="0">
                <tr> 
                  <td colspan="8"><font color="#000000" size="3" face="Tahoma"><strong>You 
                    have chosen to enrol on</strong></font><font color="#FFFFFF"><?php echo $row_ChosenCourse['StartDateID']; ?> 
                    <input name="textfield" type="text" value="<?php echo $row_ChosenCourse['StartDateID']; ?>">
                    </font></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="3" face="Tahoma"><strong>Course</strong></font></td>
                  <td colspan="6"><font size="3" face="Tahoma"><?php echo $row_ChosenCourse['Name']; ?></font></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="3" face="Tahoma"><strong>Location</strong></font></td>
                  <td colspan="6"><font size="3" face="Tahoma"><?php echo $row_ChosenCourse['LocName']; ?></font></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="3" face="Tahoma"><strong>Starting on</strong></font></td>
                  <td colspan="6"><font size="3" face="Tahoma"><?php echo date ('D d-M-Y',strtotime($row_ChosenCourse['StartDate'])); ?></font></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="3" face="Tahoma">&nbsp;</font></td>
                  <td colspan="6"><font size="3" face="Tahoma"><?php echo $row_ChosenCourse['Time']; ?></font></td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="8"> <div align="center">Please Complete ALL sections 
                      in full. If you have any difficulties please contact the college 
                      on 01926 810942</div></td>
                </tr>
                <tr> 
                  <td colspan="8"> <div align="center"></div></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Forename:</font></td>
                  <td colspan="6"><input name="Forename" type="text" id="Forename" size="30" maxlength="30"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Surname:</font></td>
                  <td colspan="6"><input name="Surname" type="text" id="Surname" size="30" maxlength="30"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Title:</font></td>
                  <td colspan="6"><select name="Title" id="Title">
                      <option value="-">-</option>
                      <option value="Ms">Ms</option>
                      <option value="Mrs">Mrs</option>
                      <option value="Miss">Miss</option>
                      <option value="Mr">Mr</option>
                      <option value="Dr">Dr</option>
                    </select></td>
                </tr>
                <tr> 
                  <td width="13%"><font size="2">Date of Birth:</font></td>
                  <td width="10%"><div align="right"><font size="2">Date</font></div></td>
                  <td width="9%"><select name="DOB_Date" id="DOB_Date">
                      <option value="-">-</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>
                      <option value="13">13</option>
                      <option value="14">14</option>
                      <option value="15">15</option>
                      <option value="16">16</option>
                      <option value="17">17</option>
                      <option value="18">18</option>
                      <option value="19">19</option>
                      <option value="20">20</option>
                      <option value="21">21</option>
                      <option value="22">22</option>
                      <option value="23">23</option>
                      <option value="24">24</option>
                      <option value="25">25</option>
                      <option value="26">26</option>
                      <option value="27">27</option>
                      <option value="28">28</option>
                      <option value="29">29</option>
                      <option value="30">30</option>
                      <option value="31">31</option>
                    </select></td>
                  <td width="9%"><div align="right"><font size="2">Month</font></div></td>
                  <td width="13%"><select name="DOB_Mth" id="DOB_Mth">
                      <option value="-">-</option>
                      <option value="1">January</option>
                      <option value="2">February</option>
                      <option value="3">March</option>
                      <option value="4">April</option>
                      <option value="5">May</option>
                      <option value="6">June</option>
                      <option value="7">July</option>
                      <option value="8">August</option>
                      <option value="9">September</option>
                      <option value="10">October</option>
                      <option value="11">November</option>
                      <option value="12">December</option>
                    </select></td>
                  <td width="8%"><div align="right"><font size="2">Year</font></div></td>
                  <td colspan="2"><select name="DOB_Yr" id="DOB_Yr">
                      <option value="-">-</option>
                      <option value="1990">1990</option>
                      <option value="1989">1989</option>
                      <option value="1988">1988</option>
                      <option value="1987">1987</option>
                      <option value="1986">1986</option>
                      <option value="1985">1985</option>
                      <option value="1984">1984</option>
                      <option value="1983">1983</option>
                      <option value="1982">1982</option>
                      <option value="1981">1981</option>
                      <option value="1980">1980</option>
                      <option value="1979">1979</option>
                      <option value="1978">1978</option>
                      <option value="1977">1977</option>
                      <option value="1976">1976</option>
                      <option value="1975">1975</option>
                      <option value="1974">1974</option>
                      <option value="1973">1973</option>
                      <option value="1972">1972</option>
                      <option value="1971">1971</option>
                      <option value="1970">1970</option>
                      <option value="1969">1969</option>
                      <option value="1968">1968</option>
                      <option value="1967">1967</option>
                      <option value="1966">1966</option>
                      <option value="1965">1965</option>
                      <option value="1964">1964</option>
                      <option value="1963">1963</option>
                      <option value="1962">1962</option>
                      <option value="1961">1961</option>
                      <option value="1960">1960</option>
                      <option value="1959">1959</option>
                      <option value="1958">1958</option>
                      <option value="1957">1957</option>
                      <option value="1956">1956</option>
                      <option value="1955">1955</option>
                      <option value="1954">1954</option>
                      <option value="1953">1953</option>
                      <option value="1952">1952</option>
                      <option value="1951">1951</option>
                      <option value="1950">1950</option>
                      <option value="1949">1949</option>
                      <option value="1948">1948</option>
                      <option value="1947">1947</option>
                      <option value="1946">1946</option>
                      <option value="1945">1945</option>
                      <option value="1944">1944</option>
                      <option value="1943">1943</option>
                      <option value="1942">1942</option>
                      <option value="1941">1941</option>
                      <option value="1940">1940</option>
                      <option value="1939">1939</option>
                      <option value="1938">1938</option>
                      <option value="1937">1937</option>
                      <option value="1936">1936</option>
                      <option value="1935">1935</option>
                      <option value="1934">1934</option>
                      <option value="1933">1933</option>
                      <option value="1932">1932</option>
                      <option value="1931">1931</option>
                      <option value="1930">1930</option>
                      <option value="1929">1929</option>
                      <option value="1928">1928</option>
                      <option value="1927">1927</option>
                      <option value="1926">1926</option>
                      <option value="1925">1925</option>
                      <option value="1924">1924</option>
                      <option value="1923">1923</option>
                      <option value="1922">1922</option>
                      <option value="1921">1921</option>
                      <option value="1920">1920</option>
                      <option value="1919">1919</option>
                      <option value="1918">1918</option>
                      <option value="1917">1917</option>
                      <option value="1916">1916</option>
                      <option value="1915">1915</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Gender:</font></td>
                  <td colspan="6"><select name="Gender" id="Gender">
                      <option value="-">-</option>
                      <option value="Male">Male</option>
                      <option value="Female">Female</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Martial Status:</font></td>
                  <td colspan="6"><select name="MaritalStatus" id="MaritalStatus">
                      <option value="-">-</option>
                      <option value="Single">Single</option>
                      <option value="Divorced">Divorced</option>
                      <option value="Married">Married</option>
                      <option value="Widowed">Widowed</option>
                      <option value="Widower">Widower</option>
                      <option value="Single Parent">Single Parent</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Address Line 1:</font></td>
                  <td colspan="6"><input name="Address1" type="text" id="Address1"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Address Line 2:</font></td>
                  <td colspan="6"><input name="Address2" type="text" id="Address2"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Town:</font></td>
                  <td colspan="6"><input name="Town" type="text" id="Town"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">County:</font></td>
                  <td colspan="6"><input name="County" type="text" id="County"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Post Code:</font></td>
                  <td colspan="6"><input name="PostCode" type="text" id="PostCode"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Home Telephone No.:</font></td>
                  <td colspan="6"><input name="HomeNo" type="text" id="HomeNo"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Mobile No.:</font></td>
                  <td colspan="6"><input name="MobileNo" type="text" id="MobileNo"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Email Address:</font></td>
                  <td colspan="6"><input name="Email" type="text" id="Email"></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Employment Details:</font></td>
                  <td colspan="6"><select name="EmpDetails" id="EmpDetails">
                      <option value="-">-</option>
                      <option value="In Employment">In Employment</option>
                      <option value="Unemployed">Unemployed</option>
                      <option value="Retired">Retired</option>
                      <option value="Job Seekers Allowance">Job Seekers Allowance</option>
                      <option value="Working Family Tax Credit">Working Family Tax 
                      Credit</option>
                      <option value="Income Support">Income Support</option>
                      <option value="Incapacity Benefit">Incapacity Benefit</option>
                      <option value="Housing Benefit">Housing Benefit</option>
                      <option value="State Retirement Pension">State Retirement Pension</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">National Insurance Number:</font></td>
                  <td colspan="6">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Nationality:</font></td>
                  <td colspan="6"><select name="Nationality" id="Nationality">
                      <option value="-">-</option>
                      <option value="African">African</option>
                      <option value="Black or Black British">Black or Black British</option>
                      <option value="British">British</option>
                      <option value="Caribbean">Caribbean</option>
                      <option value="Irish">Irish</option>
                      <option value="Other Mixed">Other Mixed</option>
                      <option value="Scottish">Scottish</option>
                      <option value="White/Asian">White/Asian</option>
                      <option value="White/Black African">White/Black African</option>
                      <option value="White/BlackCaribbean">White/BlackCaribbean</option>
                      <option value="White Other Mixed">White/Other Mixed</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Ethnic Origin:</font></td>
                  <td colspan="6"><select name="EthnicOrigin" id="EthnicOrigin">
                      <option value="-">-</option>
                      <option value="Asian / Asian British">Asian / Asian British</option>
                      <option value="Bangladeshi">Bangladeshi</option>
                      <option value="Indian">Indian</option>
                      <option value="Pakistani">Pakistani</option>
                      <option value="Chinese">Chinese</option>
                      <option value="Other Ethnicity">Other Ethnicity</option>
                      <option value="Prefer not to say">Prefer not to say</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Have you a Special health or educational 
                    need?</font></td>
                  <td colspan="6"><select name="SpecialNeed" id="SpecialNeed">
                      <option value="N/A">N/A</option>
                      <option value="Partially Sighted">Partially Sighted</option>
                      <option value="Registered Blind">Registered Blind</option>
                      <option value="Restricited Mobility">Restricted Mobility</option>
                      <option value="Wheelchair User">Wheelchair User</option>
                      <option value="Hearing Loss">Hearing Loss</option>
                      <option value="Learning Difficulty">Learning Difficulty</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2"><font size="2">Do you consider yourself as having 
                    a disability within he meaning of the Disability Discrimintaion 
                    Act?</font> </td>
                  <td colspan="6"><select name="DisabilityAct" id="DisabilityAct">
                      <option value="N/A">N/A</option>
                      <option value="Yes">Yes</option>
                      <option value="No">No</option>
                    </select></td>
                </tr>
                <tr> 
                  <td colspan="2" valign="middle"><font size="2">Other Medical Conditions 
                    - Please Specify:</font></td>
                  <td colspan="5" valign="middle"><textarea name="MedicalCondition" id="textarea"></textarea></td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6"><input type="submit" name="Submit" value="Submit"></td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="2">&nbsp;</td>
                  <td colspan="6">&nbsp;</td>
                </tr>
              </table>
              
              
              <input type="hidden" name="MM_insert" value="form1">
            </form>
          </div></td>
      </tr>
      <tr> 
        <td height="1%" valign="bottom"><p align="center"><img src="/Images/ALB-EducforAll.jpg" width="528" height="38" align="bottom"></p></td>
      </tr>
    </table>

    </HTML>

    <?php
    mysql_free_result
    ($ChosenCourse);

    mysql_free_result($Annoucements);

    mysql_free_result($ChosenCourse);
    ?>

  2. #2
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bump

    Bump .. can anyone offer any help.

    Many Many Thanks...Dave

  3. #3
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    You've gotta love Dreamweaver for bloated code!
    try taking this part....
    PHP Code:
    $insertGoTo "/ThanksPage.php"
      if (isset(
    $HTTP_SERVER_VARS['QUERY_STRING'])) { 
        
    $insertGoTo .= (strpos($insertGoTo'?')) ? "&" "?"
        
    $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING']; 
      } 
      
    header(sprintf("Location: %s"$insertGoTo)); 
    to....
    PHP Code:
      header("Location: ThanksPage.php); 
    it might work!

    SpikeZ
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks for the help

    I found a response in a Google Group, but i thought i would post the solution ... for me anyhow here.

    Add this to the top of the code

    <?php
    ob_start();
    ?>

    Thanks

    Dave


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •