RE: [PHP-DB] i swear on a stack of bibles ....
| From: | Jason | Date: | Fri, 09 Jun 2000 19:29:25 +0000 |
| Subject: | RE: [PHP-DB] i swear on a stack of bibles .... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-297@lists.php.net to get a copy of this message | ||
Seems to me off first glance that the following has no value:
<input type="hidden" name="salesperson_email" value="<?php print
$salesperson_email;?>">
The variable $salesperson_email isn't created until after you call this
statement.
$salesperson_email=$row[("salesperson_email")];
That would be your problem.
Jason
> -----Original Message-----
> From: Kenn Murrah [mailto:warden@bakergrfx.com]
> Sent: Friday, June 09, 2000 1:22 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] i swear on a stack of bibles ....
>
>
> 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
>
>
>
>
_______________________________________________________
Site Design, Hosting, and E-Commerce at www.webpipe.net