Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 02-22-2006, 10:32 PM   PM User | #1
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
Auto Fill Form Inputs

Lets say I have a drop down menu were the options are MySQL query results. I want when I choose an option for the form to display that person's information automatically that is already stored in the DB. I think I might have to have some JavaScript to make this work.

I have the drop down menu that list the person's name from the MySQL query. Next to the drop down menu I have 3 text boxes...user's name, user's sex, user's age. I want 3 text boxes to display the information that is already in the Database when I choose the user I want to see. I have the DB table that houses users information already with the information already entered. Once I click user 2 I want that user 2's name, sex, & age to be displayed in those 3 text boxes that I already have. Then if I choose user 10 I want user 10's information to populate in those 3 text boxes. I hope I am making sense...
lansing is offline   Reply With Quote
Old 02-22-2006, 10:56 PM   PM User | #2
StupidRalph
Senior Coder

 
Join Date: Mar 2003
Location: Atlanta
Posts: 1,037
Thanks: 14
Thanked 30 Times in 28 Posts
StupidRalph is on a distinguished road
I'm not sure that this is the best way but if you were to query the DB and retrieve all the values on the page for each user and place them in an array.
You could then set the textbox values to be the arrays index. You can use javascript to scroll through the array. I like the innerText or innerHTML property personally. http://msdn.microsoft.com/library/de.../innerhtml.asp And as I said..I'm not sure if this is the best way to do this.
__________________
Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.
StupidRalph is offline   Reply With Quote
Old 02-23-2006, 03:03 PM   PM User | #3
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
You can use something like this

http://computer-helpforum.com/php/co...ulate_form.php

PHP Code:
<?php 
//error_reporting(E_ALL);
require_once('db.php'); ?>
<?php
mysql_select_db
($database_db$db);
$query_seminars "SELECT id, attend FROM seminar";
$seminars mysql_query($query_seminars$db) or die(mysql_error());
$row_seminars mysql_fetch_assoc($seminars);
$totalRows_seminars mysql_num_rows($seminars);

$colname_chosen_seminar "-1";
if (isset(
$_POST['attend'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['attend'] : addslashes($_POST['attend']);
}
mysql_select_db($database_db$db);
$query_chosen_seminar sprintf("SELECT * FROM seminar WHERE id = %s"$colname_chosen_seminar);
$chosen_seminar mysql_query($query_chosen_seminar$db) or die(mysql_error());
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function chkFrm(el){
    if(el.selectedIndex == 0){
        alert("Please choose an option");
        return false
    }
    else{
    el.form.submit();
    }
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <select name="attend" onchange="chkFrm(this)">
      <option value="Choose" <?php if (!(strcmp("Choose"$_POST['attend']))) {echo "SELECTED";} ?>>Choose Seminar</option>
      <?php
do {  
?>
      <option value="<?php echo $row_seminars['id']?>"<?php if (!(strcmp($row_seminars['id'], $_POST['attend']))) {echo "SELECTED";} ?>><?php echo $row_seminars['attend']?></option>
      <?php
} while ($row_seminars mysql_fetch_assoc($seminars));
  
$rows mysql_num_rows($seminars);
  if(
$rows 0) {
      
mysql_data_seek($seminars0);
      
$row_seminars mysql_fetch_assoc($seminars);
  }
?>
    </select>
</p>
  <p>Location 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['location']; ?>">
    <br>
    From 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['from']; ?>">
    <br>
    Leader
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['leadership']; ?>">
  </p>
</form>
</body>
</html>
<?php
mysql_free_result
($seminars);

mysql_free_result($chosen_seminar);
?>
The first query populates the dropdown.
When submitted the variable is used in the second query and that is used to populate the textfields.
degsy is offline   Reply With Quote
Old 02-23-2006, 04:37 PM   PM User | #4
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
Thanks...That is exactly what I want. I have changed the things that I needed to. It isn't working. My code is below.

This are the column name for the 3 text boxes that I want to display
Customers' E-Mail : customers_email
Customer's Id #: customers_id
Customer's Name: customers_username

I deleted lines 5 & 15 since I have those lines in my cdb.php file. Also the , $db on lines 7 & 17 since I kept getting error that sd Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\phpdev\www\templates\template 1\cp\add.php
PHP Code:
<?php 
//error_reporting(E_ALL);
require_once('cdb.php'); ?>
<?php
$query_seminars 
"SELECT customers_id, customers_email FROM customers";
$seminars mysql_query($query_seminars) or die(mysql_error());
$row_seminars mysql_fetch_assoc($seminars);
$totalRows_seminars mysql_num_rows($seminars);

$colname_chosen_seminar "-1";
if (isset(
$_POST['customers_email'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['customers_email'] : addslashes($_POST['customers_email']);
}
$query_chosen_seminar sprintf("SELECT * FROM customers WHERE customers_id = %s"$colname_chosen_seminar);
$chosen_seminar mysql_query($query_chosen_seminar) or die(mysql_error());
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function chkFrm(el){
    if(el.selectedIndex == 0){
        alert("Please choose an option");
        return false
    }
    else{
    el.form.submit();
    }
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <select name="attend" onchange="chkFrm(this)">
      <option value="Choose" <?php if (!(strcmp("Choose"$_POST['customers_email']))) {echo "SELECTED";} ?>>Choose Seminar</option>
      <?php
do {  
?>
      <option value="<?php echo $row_seminars['customers_id']?>"<?php if (!(strcmp($row_seminars['customers_id'], $_POST['customers_email']))) {echo "SELECTED";} ?>><?php echo $row_seminars['customers_email']?></option>
      <?php
} while ($row_seminars mysql_fetch_assoc($seminars));
  
$rows mysql_num_rows($seminars);
  if(
$rows 0) {
      
mysql_data_seek($seminars0);
      
$row_seminars mysql_fetch_assoc($seminars);
  }
?>
    </select>
</p>
  <p>Location 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_state']; ?>">
    <br>
    From 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_username']; ?>">
    <br>
    Leader
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_firstname']; ?>">
  </p>
</form>
</body>
</html>
<?php
mysql_free_result
($seminars);

mysql_free_result($chosen_seminar);
?> 
</body>
</html>
lansing is offline   Reply With Quote
Old 02-24-2006, 03:51 PM   PM User | #5
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
mysql_query requires the mysql_pconnect variable in this setup.

PHP Code:
$query_seminars "SELECT id, attend FROM seminar"
$seminars mysql_query($query_seminars$db
PHP Code:
$query_seminars "SELECT customers_id, customers_email FROM customers"
$seminars mysql_query($query_seminars

Example code:
PHP Code:
<?php 
$database 
"mydatabase";

$hostname "localhost";
$username "myusername";
$password "mypass";
$conn mysql_pconnect($hostname$username$password) or trigger_error(mysql_error(),E_USER_ERROR);

mysql_select_db($database$conn);
$query_seminars "SELECT id, attend FROM seminar";
$seminars mysql_query($query_seminars$conn) or die(mysql_error());
$row_seminars mysql_fetch_assoc($seminars);
$totalRows_seminars mysql_num_rows($seminars);

$colname_chosen_seminar "-1";
if (isset(
$_POST['attend'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['attend'] : addslashes($_POST['attend']);
}
mysql_select_db($database$conn);
$query_chosen_seminar sprintf("SELECT * FROM seminar WHERE id = %s"$colname_chosen_seminar);
$chosen_seminar mysql_query($query_chosen_seminar$conn) or die(mysql_error());
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
?>
degsy is offline   Reply With Quote
Old 02-28-2006, 10:46 PM   PM User | #6
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
In that required cdb.php I have the pconnect...I tried it the way you had it just changing the colum names to match my db...It still isn't working.

PHP Code:
<?php 
$database 
"******";

$hostname "localhost";
$username "*****";
$password "*****";
$conn mysql_pconnect($hostname$username$password) or trigger_error(mysql_error(),E_USER_ERROR);

mysql_select_db($database$conn);
$query_seminars "SELECT customers_id, customers_email FROM customers";
$seminars mysql_query($query_seminars$conn) or die(mysql_error());
$row_seminars mysql_fetch_assoc($seminars);
$totalRows_seminars mysql_num_rows($seminars);

$colname_chosen_seminar "-1";
if (isset(
$_POST['customers_email'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['customers_email'] : addslashes($_POST['customers_email']);
}
mysql_select_db($database$conn);
$query_chosen_seminar sprintf("SELECT * FROM customers WHERE customers_id = %s"$colname_chosen_seminar);
$chosen_seminar mysql_query($query_chosen_seminar$conn) or die(mysql_error());
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function chkFrm(el){
    if(el.selectedIndex == 0){
        alert("Please choose an option");
        return false
    }
    else{
    el.form.submit();
    }
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <select name="attend" onchange="chkFrm(this)">
      <option value="Choose" <?php if (!(strcmp("Choose"$_POST['customers_email']))) {echo "SELECTED";} ?>>Choose Seminar</option>
      <?php
do {  
?>
      <option value="<?php echo $row_seminars['customers_id']?>"<?php if (!(strcmp($row_seminars['customers_id'], $_POST['customers_email']))) {echo "SELECTED";} ?>><?php echo $row_seminars['customers_email']?></option>
      <?php
} while ($row_seminars mysql_fetch_assoc($seminars));
  
$rows mysql_num_rows($seminars);
  if(
$rows 0) {
      
mysql_data_seek($seminars0);
      
$row_seminars mysql_fetch_assoc($seminars);
  }
?>
    </select>
</p>
  <p>Location 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_state']; ?>">
    <br>
    From 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_username']; ?>">
    <br>
    Leader
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_firstname']; ?>">
  </p>
</form>
</body>
</html>
<?php
mysql_free_result
($seminars);

mysql_free_result($chosen_seminar);
?> 
</body>
</html>
lansing is offline   Reply With Quote
Old 03-01-2006, 03:48 PM   PM User | #7
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
What is the error?
degsy is offline   Reply With Quote
Old 03-02-2006, 02:00 AM   PM User | #8
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
The text boxes aren't getting field. I choose an e-mail in the drop down menu...the page acts likes it is automatically reloaded the page once I click the option in the menu but nothing appears in the text boxes.
lansing is offline   Reply With Quote
Old 03-02-2006, 03:50 PM   PM User | #9
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
You would have to post a link to the page with the source code and database structure.

Personally, I think you should just look through the code and put in error checks and echos to make sure the submitted data is what it is supposed to be.
degsy is offline   Reply With Quote
Old 03-02-2006, 04:22 PM   PM User | #10
arnyinc
Regular Coder

 
Join Date: Jan 2003
Posts: 863
Thanks: 4
Thanked 8 Times in 8 Posts
arnyinc is an unknown quantity at this point
mysql_fetch_assoc is case sensitive. Maybe you entered the row names as all upper case in your db?
arnyinc is offline   Reply With Quote
Old 03-02-2006, 05:16 PM   PM User | #11
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
http://www.hostwithgold.com/testing/add.php
There is the link to that page & here is the source code...the add.php file
PHP Code:
<?php 
$database 
"******";

$hostname "localhost";
$username "******";
$password "*******";
$conn mysql_pconnect($hostname$username$password) or trigger_error(mysql_error(),E_USER_ERROR);

mysql_select_db($database$conn);
$query_seminars "SELECT customers_id, customers_email FROM customers";
$seminars mysql_query($query_seminars$conn) or die(mysql_error());
$row_seminars mysql_fetch_assoc($seminars);
$totalRows_seminars mysql_num_rows($seminars);

$colname_chosen_seminar "-1";
if (isset(
$_POST['customers_email'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['customers_email'] : addslashes($_POST['customers_email']);
}
mysql_select_db($database$conn);
$query_chosen_seminar sprintf("SELECT * FROM customers WHERE customers_id = %s"$colname_chosen_seminar);
$chosen_seminar mysql_query($query_chosen_seminar$conn) or die(mysql_error());
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function chkFrm(el){
    if(el.selectedIndex == 0){
        alert("Please choose an option");
        return false
    }
    else{
    el.form.submit();
    }
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <select name="attend" onchange="chkFrm(this)">
      <option value="Choose" <?php if (!(strcmp("Choose"$_POST['customers_email']))) {echo "SELECTED";} ?>>Choose Seminar</option>
      <?php
do {  
?>
      <option value="<?php echo $row_seminars['customers_id']?>"<?php if (!(strcmp($row_seminars['customers_id'], $_POST['customers_email']))) {echo "SELECTED";} ?>><?php echo $row_seminars['customers_email']?></option>
      <?php
} while ($row_seminars mysql_fetch_assoc($seminars));
  
$rows mysql_num_rows($seminars);
  if(
$rows 0) {
      
mysql_data_seek($seminars0);
      
$row_seminars mysql_fetch_assoc($seminars);
  }
?>
    </select>
</p>
  <p>Customer ID 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_id']; ?>">
    <br>
    Customer E-Mail 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_email']; ?>">
    <br>
    User Name
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_username']; ?>">
  </p>
</form>
</body>
</html>
<?php
mysql_free_result
($seminars);

mysql_free_result($chosen_seminar);
?> 
</body>
</html>
Here is the structure of the db
Code:
CREATE TABLE `customers` (
  `customers_id` int(11) NOT NULL auto_increment,
  `customers_firstname` varchar(32) NOT NULL default '',
  `customers_lastname` varchar(32) NOT NULL default '',
  `customers_email` varchar(96) NOT NULL default '',
  `customers_phone` varchar(32) NOT NULL default '',
  `customers_phone2` varchar(32) NOT NULL default '',
  `customers_street_address` varchar(64) NOT NULL default '',
  `customers_city` varchar(64) NOT NULL default '',
  `customers_postcode` varchar(64) NOT NULL default '',
  `customers_state` varchar(64) NOT NULL default '',
  `customers_country` varchar(64) NOT NULL default '',
  `customers_fax` varchar(32) default NULL,
  `customers_username` varchar(30) NOT NULL default '',
  `customers_password` varchar(40) NOT NULL default '',
  `customers_newsletter` char(1) default NULL,
  `customers_ip` varchar(32) NOT NULL default '',
  `customers_date_of_last_logon` datetime default NULL,
  `customers_number_of_logons` int(5) default NULL,
  `customers_date_account_created` datetime default NULL,
  `customers_date_account_last_modified` datetime default NULL,
  PRIMARY KEY  (`customers_id`)
lansing is offline   Reply With Quote
Old 03-02-2006, 06:58 PM   PM User | #12
arnyinc
Regular Coder

 
Join Date: Jan 2003
Posts: 863
Thanks: 4
Thanked 8 Times in 8 Posts
arnyinc is an unknown quantity at this point
It appears to be a problem with your second SQL query. The value of $colname_chosen_seminar will either be -1 or an email address. And you are searching your db table for customers_id which is an int.

$query_chosen_seminar = sprintf("SELECT * FROM customers WHERE customers_id = %s", $colname_chosen_seminar);

Do an echo of your sql statement and make sure it looks how you want it. Test it in phpmyadmin or by passing it statically to your db.
arnyinc is offline   Reply With Quote
Old 03-03-2006, 05:58 AM   PM User | #13
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
I am not too good at this error testing with echo. I am not all that great with php. I tried this code below with the echo for errors. I am not sure if this is how you test for errors or not so if it isn't then could you say how to test it for error or give link to a tutorial on how to test for errors with echo's? I have the echo's echoing First query error or Second query error for the 1st & 2nd queries, but I put a number 1,2,3, & 4 in the echo text so that I could tell which step the error was in.

Also on the link that degsy provided once you choose an drop down option the page displays the text boxes with the info, but also the option that you chose was still chosen...you could see the option you chose without clicking to drop the menu down.

With the code below I got this showing:
First query OK 1
First query OK 2
First query OK 3
First query OK 4
Second query OK 1
Second query OK 2
Second query error 3
Second query error 4


PHP Code:
<?php 
//error_reporting(E_ALL);
require_once('cdb.php'); ?>
<?php
mysql_select_db
($db_name$conn);
$query_seminars "SELECT customers_id, customers_email FROM customers";
if(!
$query_seminars){
    echo 
'<br>First query error 1';
} else {
    echo 
'<br>First query OK 1';
    }
$seminars mysql_query($query_seminars$conn) or die(mysql_error());
if(!
$seminars){
    echo 
'<br>First query error 2';
} else {
    echo 
'<br>First query OK 2';
    }
$row_seminars mysql_fetch_assoc($seminars);
if(!
$row_seminars){
    echo 
'<br>First query error 3';
} else {
    echo 
'<br>First query OK 3';
    }
$totalRows_seminars mysql_num_rows($seminars);
if(!
$totalRows_seminars){
    echo 
'<br>First query error 4';
} else {
    echo 
'<br>First query OK 4';
    }

$colname_chosen_seminar "-1";
if (isset(
$_POST['customers_email'])) {
  
$colname_chosen_seminar = (get_magic_quotes_gpc()) ? $_POST['customers_email'] : addslashes($_POST['customers_email']);
}
mysql_select_db($db_name$conn);
$query_chosen_seminar sprintf("SELECT * FROM customers WHERE customers_id = %s"$colname_chosen_seminar);
if(!
$query_chosen_seminar){
    echo 
'<br>Second query error 1';
} else {
    echo 
'<br>Second query OK 1';
    }
$chosen_seminar mysql_query($query_chosen_seminar$conn) or die(mysql_error());
if(!
$chosen_seminar){
    echo 
'<br>Second query error 2';
} else {
    echo 
'<br>Second query OK 2';
    }
$row_chosen_seminar mysql_fetch_assoc($chosen_seminar);
if(!
$row_chosen_seminar){
    echo 
'<br>Second query error 3';
} else {
    echo 
'<br>Second query OK 3';
    }
$totalRows_chosen_seminar mysql_num_rows($chosen_seminar);
if(!
$totalRows_chosen_seminar){
    echo 
'<br>Second query error 4';
} else {
    echo 
'<br>Second query OK 4';
    }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
function chkFrm(el){
    if(el.selectedIndex == 0){
        alert("Please choose an option");
        return false
    }
    else{
    el.form.submit();
    }
}
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p>
    <select name="attend" onchange="chkFrm(this)">
      <option value="Choose" <?php if (!(strcmp("Choose"$_POST['customers_email']))) {echo "SELECTED";} ?>>Choose Seminar</option>
      <?php
do {  
?>
      <option value="<?php echo $row_seminars['customers_id']?>"<?php if (!(strcmp($row_seminars['customers_id'], $_POST['customers_email']))) {echo "SELECTED";} ?>><?php echo $row_seminars['customers_email']?></option>
      <?php
} while ($row_seminars mysql_fetch_assoc($seminars));
  
$rows mysql_num_rows($seminars);
  if(
$rows 0) {
      
mysql_data_seek($seminars0);
      
$row_seminars mysql_fetch_assoc($seminars);
  }
?>
    </select>
</p>
  <p>State 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_state']; ?>">
    <br>
    E-Mail 
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_email']; ?>">
    <br>
    User Name
    <input name="textfield" type="text" value="<?php echo $row_chosen_seminar['customers_username']; ?>">
  </p>
</form>
</body>
</html>
<?php
mysql_free_result
($seminars);

mysql_free_result($chosen_seminar);
?>
lansing is offline   Reply With Quote
Old 03-03-2006, 03:13 PM   PM User | #14
degsy
Senior Coder

 
Join Date: Nov 2002
Location: North-East, UK
Posts: 1,265
Thanks: 0
Thanked 0 Times in 0 Posts
degsy is on a distinguished road
Your select name is attend

PHP Code:
<select name="attend" onchange="chkFrm(this)"
You query is looking for something else
PHP Code:
if (isset($_POST['customers_email'])) 
degsy is offline   Reply With Quote
Old 03-03-2006, 03:57 PM   PM User | #15
lansing
Regular Coder

 
Join Date: Dec 2005
Posts: 346
Thanks: 1
Thanked 0 Times in 0 Posts
lansing has a little shameless behaviour in the past
Thanks!
lansing is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:42 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.