Avatar of blaadom
blaadom
 asked on

Populating 2 php pages from a MySQL table and updating the table by the ID no

I have 2 php pages at the moment which add a new field in a MySQL db table. The first page has data, this data is passed to page2 with session variables and then all the data gets entered in to the table.

I want to do an update to that table going by the ID no. selected.

On my first page, I have the following code that selects the "IO" no from the table (IO is primary key and is autoincremented):

<?php
require("connect.php");

$sql = "SELECT IO FROM bebo";
$result = mysql_query($sql) or die(mysql_error());
echo "<form action='io_bebo_edit_page2.php' name='myform'>";
echo "<select name='IO' onChange='submit()'>";
echo "<option value=''>Select IO No</option>";
while ($row = mysql_fetch_assoc($result)) {
echo "<option value='{$row['IO']}'>{$row['IO']}</option>";
}
echo "</select>";
echo "</form>";
?>

I want to be able to populate all the fields in page2 when I select the "IO" no, and then populate all the fileds on page3 as well when i click next.
When I go on to page2, I want to be able to change / edit any info and carry that accross to page3. And the same for page3, i want to edit anything and then udate the table according to the "IO" no.

At the moment I'm stuck after selecting the IO no on page1 and going on to page2
PHP

Avatar of undefined
Last Comment
blaadom

8/22/2022 - Mon
Vel Eous

Chage:
echo "<form action='io_bebo_edit_page2.php' name='myform'>";

To:
echo "<form action='io_bebo_edit_page2.php?io=$row['IO']' name='myform' method='get'>";

That will send the option value to your URL.  Then in io_bebo_edit_page2.php place:

$io = $_GET['io'];

Which will get the IO from the URL to be used where ever you like.

$exmaple = mysql_query("SELECT * FROM bebo WHERE IO = '$io'");
blaadom

ASKER
If I include the line:
echo "<form action='io_bebo_edit_page2.php?io=$row['IO']' name='myform' method='get'>";

I get the error:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in ....

any ideas?
Vel Eous

Sorry, I made a mistake.

Change:

echo "<form action='io_bebo_edit_page2.php?io=$row['IO']' name='myform' method='get'>";

To:

echo "<form action='io_bebo_edit_page2.php?io=$io' name='myform' method='get'>";



Change:

while ($row = mysql_fetch_assoc($result)) {
echo "<option value='{$row['IO']}'>{$row['IO']}</option>";
}

To:

while ($row = mysql_fetch_assoc($result)) {
$io = $row['IO'];
echo "<option value='$io'>$io</option>";
}
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
blaadom

ASKER
Ok i changed the top. It goes on to page2 like at the start, so what do i need to populate the form text fields?

On page2 at the moment i have:

<?php
session_start();
mysql_error();
?>
<?php
$IO = $_GET['IO'];

require("connect.php");
?>

For one of the text fields i have:
<input name="client" type="text" id="client" size="58" maxlength="50" value="<?php echo $myrow["client"] ?>">

is that right or how would you go about it?
I presume i'll need another select statement at the top going by what "IO" no the user selects
Vel Eous

<?PHP

inculde_once("connect.php");
session_start();

$io = $_GET['io'];

$get_data = mysql_query("SELECT * FROM table where column_name = $'io'")
or die ("get_data error: " . mysql_error());

while ($myrow = mysql_fetch_array($get_data)) {
$client = $myrow['client'];
echo ("<input type='text' name='client' value='$client' /><br />");
}

?>
blaadom

ASKER
I'm just getting the following error now:

get_data error: You have an error in your SQL syntax near ''io'' at line 1

The query looks ok though, but i'm not sure if it's recognising where the user selects "io" compared to whats in the database
âš¡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Vel Eous

lol, I`m not having a very good day today  :P

Had a ' on the wrong side of the $ symbol.

$get_data = mysql_query("SELECT * FROM table where column_name = '$io'")
or die ("get_data error: " . mysql_error());
blaadom

ASKER
Ok I'm not getting any errors :-), but not getting anything printed out from the db.

This is what I have:

<?php
session_start();
mysql_error();
?>
<?php
$io = $_GET['io'];
require("connect.php");
$get_data = mysql_query("SELECT * FROM table where IO = '$io'")
or die ("get_data error: " . mysql_error());

while ($myrow = mysql_fetch_array($get_data)) {
$client = $myrow['client'];
echo ("<input type='text' name='client' value='$client' /><br />");
}

?>

Then in a table on the page I have:

<input name="client" type="text" id="client" size="58" maxlength="50" value="<?php echo $myrow["client"] ?>">

In my DB Table the field name is "Client" (just for example)
Vel Eous

A few things ...

1.  You dont need to close then reopen PHP onlines 4 & 5.
2.  mysql_error() is not required there as it only returns an error from the previous SQL statement.  As this is a new page there are none.
3.  Having <input name="client" type="text" id="client" size="58" maxlength="50" value="<?php echo $myrow["client"] ?>"> outside the PHP while statement will no do a thing.



<?PHP

session_start();
inculde_once("connect.php");

$io = $_GET['io'];
echo ("IO value is: ") . $io;  // test that the $io variable is being collected from the URL

$get_data = mysql_query("SELECT * FROM table where column_name = '$io'")
or die ("get_data error: " . mysql_error());

while ($myrow = mysql_fetch_array($get_data)) {
$client = $myrow['client'];
echo ("Client value is: ") . $client;  // test if any data is being retreived
echo ("<input type='text' name='client' value='$client' /><br />");
}

?>


Note the ECHO's to test the variables are being defined.  Use that to see if all the variables are being defined.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
blaadom

ASKER
Is there any advantage / difference at all to using:

inculde_once("connect.php");   (*include)
to
require("connect.php");

So I've tried the above that you posted and noticed the echo's but nothing gets printed out, not even the IO no.
Vel Eous

There is no major difference, I just use include.

Can you past a copy of your form code & your PHP on page2 please ?
blaadom

ASKER
I thought i'd just paste all of page2, it is long but there are about 17 fields that I'm getting info for this page.

<?php
session_start();
include_once("connect.php");

$io = $_GET['io'];
echo ("IO value is: ") .$io;  // test that the $io variable is being collected from the URL

$get_data = mysql_query("SELECT * FROM table where IO = '$io'")
or die ("get_data error: " . mysql_error());

while ($myrow = mysql_fetch_array($get_data)) {
$client = $myrow['client'];
echo ("Client value is: ") . $client;  // test if any data is being retreived
echo ("<input type='text' name='client' value='$client' /><br />");
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Generator Intranet</title>
<style type="text/css">
<!--
.style4 {color: #FF0000}
.style5 {color: #000000}
-->
</style>
</head>

<BODY BGCOLOR="#FFFFFF" TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0>
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  <tr>
    <th width="200" rowspan="2" valign="top" bgcolor="#FFFFFF" scope="col"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/>
        </td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="clients.php" class="style5">Client Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong> <a href="campaigns.php" class="style5">Campaign Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="publishers.php" class="style5">Publisher Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="insertion_orders.php" class="style5">Insertion Orders</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="sales_sheets.php" class="style5">Sales Sheet Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="invoices.php" class="style5">Invoice Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left"><strong><a href="statements.php" class="style5">Statements Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td><div align="left"></div></td>
        <td><div align="left"><strong><a href="accounts.php" class="style5">Accounts Section</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td><div align="left"></div></td>
        <td><div align="left"><strong><a href="quality_control.php" class="style5">Quality Control</a></strong></div></td>
      </tr>
      <tr>
        <td colspan="2"><hr align="left" width="100%" color="#C9DAF4"/></td>
      </tr>
      <tr>
        <td width="8%"><div align="left"></div></td>
        <td width="92%"><div align="left">
          <p>&nbsp;</p>
          </div></td>
      </tr>
    </table></th>
    <td height="21" valign="middle" bgcolor="#FFFFFF" scope="col"><div align="center"><strong><?php echo $_SESSION['user']; ?>, please enter the following information:</strong></div></td>
  </tr>
  <tr>
    <td height="396" bgcolor="#FFFFFF" scope="col"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
      <form id="form1" name="form1" method="post" action="page3.php">
        <tr>
          <th width="2%" align="left" valign="baseline" scope="col">&nbsp;</th>
          <th width="40%" height="27" align="left" valign="baseline" scope="col"><div align="left">
              <p><strong>Site:</strong></p>
          </div></th>
          <th height="27" colspan="2" align="left" valign="baseline" scope="col">Bebo
            <input name="site" type="hidden" id="site" value="Bebo" /></th>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="27" align="left" valign="baseline"><div align="left">
              <p><strong>Client:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <p>
                <input name="client" type="text" id="client" size="58" maxlength="50" value="<?php echo $myrow["client"] ?>">
              </p>
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="25" align="left" valign="baseline"><div align="left">
              <p><strong>Campaign:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <p>
                <input name="campaign" type="text" id="campaign" size="58" maxlength="70" />
              </p>
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Service Dates: </strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <p>
                <select name="service_start_day" id="service_start_day">
                  <option value='0' selected="selected">Day</option>
                  <option value='01'>01</option>
                  <option value='02'>02</option>
                  <option value='03'>03</option>
                  <option value='04'>04</option>
                  <option value='05'>05</option>
                  <option value='06'>06</option>
                  <option value='07'>07</option>
                  <option value='08'>08</option>
                  <option value='09'>09</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>
                <select name="service_start_month" id="service_start_month">
                  <option value='0' selected="selected">Month</option>
                  <option value='01'>01</option>
                  <option value='02'>02</option>
                  <option value='03'>03</option>
                  <option value='04'>04</option>
                  <option value='05'>05</option>
                  <option value='06'>06</option>
                  <option value='07'>07</option>
                  <option value='08'>08</option>
                  <option value='09'>09</option>
                  <option value='10'>10</option>
                  <option value='11'>11</option>
                  <option value='12'>12</option>
                </select>
                <select name="service_start_year" id="service_start_year">
                  <option value='0' selected="selected">Year</option>
                  <option value='2007'>2007</option>
                  <option value='2008'>2008</option>
                  <option value='2009'>2009</option>
                  <option value='2010'>2010</option>
                  <option value='2011'>2011</option>
                  <option value='2012'>2012</option>
                  <option value='2013'>2013</option>
                  <option value='2014'>2014</option>
                  <option value='2015'>2015</option>
                  <option value='2016'>2016</option>
                  <option value='2017'>2017</option>
                  <option value='2018'>2018</option>
                  <option value='2019'>2019</option>
                  <option value='2020'>2020</option>
                </select>
                -
                <select name="service_end_day" id="service_end_day">
                  <option value='0' selected="selected">Day</option>
                  <option value='01'>01</option>
                  <option value='02'>02</option>
                  <option value='03'>03</option>
                  <option value='04'>04</option>
                  <option value='05'>05</option>
                  <option value='06'>06</option>
                  <option value='07'>07</option>
                  <option value='08'>08</option>
                  <option value='09'>09</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>
                <select name="service_end_month" id="service_end_month">
                  <option value='0' selected="selected">Month</option>
                  <option value='01'>01</option>
                  <option value='02'>02</option>
                  <option value='03'>03</option>
                  <option value='04'>04</option>
                  <option value='05'>05</option>
                  <option value='06'>06</option>
                  <option value='07'>07</option>
                  <option value='08'>08</option>
                  <option value='09'>09</option>
                  <option value='10'>10</option>
                  <option value='11'>11</option>
                  <option value='12'>12</option>
                </select>
                <select name="service_end_year" id="service_end_year">
                  <option value='0' selected="selected">Year</option>
                  <option value='2007'>2007</option>
                  <option value='2008'>2008</option>
                  <option value='2009'>2009</option>
                  <option value='2010'>2010</option>
                  <option value='2011'>2011</option>
                  <option value='2012'>2012</option>
                  <option value='2013'>2013</option>
                  <option value='2014'>2014</option>
                  <option value='2015'>2015</option>
                  <option value='2016'>2016</option>
                  <option value='2017'>2017</option>
                  <option value='2018'>2018</option>
                  <option value='2019'>2019</option>
                  <option value='2020'>2020</option>
                </select>
              </p>
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Contact Name: </strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <input name="name" type="text" id="name" size="58" maxlength="50" />
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Address:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <input name="address" type="text" id="address" size="58" maxlength="70" />
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Telephone:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <input name="telephone" type="text" id="telephone" size="58" maxlength="30" />
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Email:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <input name="email" type="text" id="email" size="58" maxlength="60" />
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Purchase Order No.: </strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <input name="po_no" type="text" id="po_no" size="58" maxlength="50" />
          </div></td>
        </tr>
        <tr>
          <td align="left" valign="baseline">&nbsp;</td>
          <td height="5" align="left" valign="baseline"><div align="left">
              <p><strong>Date of Receipt of Order:</strong></p>
          </div></td>
          <td height="27" colspan="2" align="left" valign="baseline"><div align="left">
              <select name="receipt_day" id="receipt_day">
                <option value='0' selected="selected">Day</option>
                <option value='01'>01</option>
                <option value='02'>02</option>
                <option value='03'>03</option>
                <option value='04'>04</option>
                <option value='05'>05</option>
                <option value='06'>06</option>
                <option value='07'>07</option>
                <option value='08'>08</option>
                <option value='09'>09</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>
              <select name="receipt_month" id="receipt_month">
                <option value='0' selected="selected">Month</option>
                <option value='01'>01</option>
                <option value='02'>02</option>
                <option value='03'>03</option>
                <option value='04'>04</option>
                <option value='05'>05</option>
                <option value='06'>06</option>
                <option value='07'>07</option>
                <option value='08'>08</option>
                <option value='09'>09</option>
                <option value='10'>10</option>
                <option value='11'>11</option>
                <option value='12'>12</option>
              </select>
              <select name="receipt_year" id="receipt_year">
                <option value='0' selected="selected">Year</option>
                <option value='2007'>2007</option>
                <option value='2008'>2008</option>
                <option value='2009'>2009</option>
                <option value='2010'>2010</option>
                <option value='2011'>2011</option>
                <option value='2012'>2012</option>
                <option value='2013'>2013</option>
                <option value='2014'>2014</option>
                <option value='2015'>2015</option>
                <option value='2016'>2016</option>
                <option value='2017'>2017</option>
                <option value='2018'>2018</option>
                <option value='2019'>2019</option>
                <option value='2020'>2020</option>
              </select>
          </div></td>
        </tr>
        <tr>
          <td valign="baseline">&nbsp;</td>
          <td height="15" valign="baseline">&nbsp;</td>
          <td height="15" valign="baseline">&nbsp;</td>
          <td height="15" valign="baseline">&nbsp;</td>
        </tr>
        <tr>
          <td valign="baseline">&nbsp;</td>
          <td valign="baseline"><div align="left"></div></td>
          <td width="24%" height="43" valign="baseline"><div align="center">
              <input name="Next Page" type="submit" id="Next Page" value="Next Page" />
          </div></td>
          <td width="34%" height="43" valign="baseline">&nbsp;</td>
        </tr>
      </form>
    </table></td>
  </tr>

</table>
</body>
</html>
âš¡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Vel Eous

##--[ YOUR FORM ]--##

<?php
include_once ("connect.php");

$sql = "SELECT IO FROM bebo";
$result = mysql_query($sql)
      or die(mysql_error());
echo "<form action='io_bebo_edit_page2.php' name='myform' method='get'>";
echo "<select name='io' onChange='submit()'>";
echo "<option value=''>Select IO No</option>";
while ($row = mysql_fetch_assoc($result)) {
      $io = $row['IO'];
      echo "<option value='$io'>$io</option>";
}

echo "</select>";
echo "</form>";
?>



##--[ PAGE2.PHP ]--##

<?PHP

session_start();
inculde_once("connect.php");

$io = $_GET['io'];
echo ("IO value is: ") . $io;  // test that the $io variable is being collected from the URL

$get_data = mysql_query("SELECT * FROM table where column_name = '$io'")
or die ("get_data error: " . mysql_error());

while ($myrow = mysql_fetch_array($get_data)) {
      $client = $myrow['client'];
      echo ("Client value is: ") . $client;  // test if any data is being retreived
      echo ("<input type='text' name='client' value='$client' /><br />");
}

?>
blaadom

ASKER
Ok cool I'm getting there ;-)

I have to declare all the values again to get them printed, so:

      $client = $myrow['Client'];

will get printed out like this:

                <input name="client" type="text" id="client" size="58" maxlength="50" value="<?php echo $client; ?>"/>

If i have a drop down menu, like i do for the date how would that get desplayed?i.e.

        $service_start_day = $myrow['Service_Start_Day'];

                <select name="service_start_day" id="service_start_day" value="<?php echo $service_start_day; ?>"/>
                  <option value='0' selected="selected">Day</option>
                  <option value='01'>01</option>
                  <option value='02'>02</option>

Once, I get this part sorted then i can go on to the next page, which is just a lot more fields to get the echo vars put in.
ASKER CERTIFIED SOLUTION
Vel Eous

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
blaadom

ASKER
Ok i got the select box populating by having the following:

        $service_start_day = $myrow['Service_Start_Day'];

<select name="service_start_day" id="service_start_day"/>
<option value='' selected="selected"><?php echo $service_start_day; ?></option>

Everything works on page2 now :)

so i'm on page3, but it's not retrieving data for me (from the same table according to the IO no the user selected) Do i need to have the "IO" no as a session variable for this? Do i need to have the same select statement as in the previous page?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
SOLUTION
Vel Eous

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
âš¡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
blaadom

ASKER
I still can't seem to bring "io" across as a session. Nothing is being displayed.

In a page i had before, I used:

$_SESSION['user'] = $_POST['username'];

and any other pages, I could print it out <?php echo $_SESSION['user']; ?>

but that way dosen't seem to be working either
blaadom

ASKER
Thanks for the help. I got it all sorted at last