i swear on a stack of bibles ....

From: Date: Fri, 09 Jun 2000 19:21:37 +0000
Subject: i swear on a stack of bibles ....
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-296@lists.php.net to get a copy of this message
I swear I'll never bother you with a newbie question like this again, but this is truly driving me nuts !!! In this example, I've read the salesperson_email from my database and can get it to print successfully... then I update the information and write to another file and cannot get it to carry over the salesperson_email to the next file to save my life. BRIBE: If you live close enough, I'll buy you a case of beer for your help. If not, I'll be your friend forever .... no, really !! first file: <?php mysql_connect ("localhost","root"); mysql_select_db ("bakergrfx"); $result = mysql_query("SELECT customer.customer_code, customer_name, salespersons.salesperson_code, salesperson_name, job_number, salesperson_email, csr_email from job_info, salespersons, customer where customer.salesperson_code=salespersons.salesperson_code and job_info.customer_code=customer.customer_code and job_number = '$job_number'"); if ($row = mysql_fetch_array($result)) { do { print $row["customer_code"]; print (" ");print (" ");print (" "); print $row["customer_name"];print ("<p>"); print $row["job_number"];print (" "); print $row[("salesperson_email")]; print ("<p>"); } while($row = mysql_fetch_array($result)); } else {print "Sorry, no records were found!";} ?> <form method=get action=preflight_3.php> <input type="hidden" name="job_number" value="<?php print $job_number;?>"> <input type="hidden" name="salesperson_email" value="<?php print $salesperson_email;?>"> <input type="hidden" name="csr_email" value="<?php print $csr_email;?>"> <?php $salesperson_email=$row[("salesperson_email")]; echo "$salesperson_email"; print $row[("salesperson_email")]; ?> <p> UPDATE STATUS: <select name="production_status"> <option>Preflight OK</option> <option>PROBLEMS--Fonts Missing</option> <option>PROBLEMS--Graphics Missing</option> <option>PROBLEMS--Planning Issues</option> <option>PROBLEMS--Multiple Preflight/Planning Issues</option> </select><P> <textarea name="comments" cols="50" rows="9"></textarea> <input type=submit> </body> </html> second file: <html> <head> <title> Job Entry</title></head> <body> <?php echo "$salesperson_email"; mysql_connect ("localhost","root"); mysql_select_db ("bakergrfx"); $sql = "update job_info set production_status='$production_status',job_number='$job_number' where job_number = $job_number" ; $result = mysql_query($sql) or die("cannot execute query"); $subject = "$job_number" . "$production_status"; mail("$salesperson_email", "$subject", "$comments", "From: Preflight\n"); $sql = "insert into preflight_activity (preflight_status,job_number,preflight_comments) values('$production_status', '$job_number', '$comments')" ; $result = mysql_query($sql) or die("cannot execute"); ?> </form> </body> </html> THanks again... Kenn

« previous php.db (#296) next »