Question

Answer and question is not complete. Therefore, have edited out the question.

Was it helpful?

Solution

I'm guessing this is the link that you are clicking and need to it to pass on values?

echo "<a href='insertnewquotation.php'><input type='button' class='button' value='Add New Items' /></a>";

It's simply a matter of appending query string variables to the URL so that the insertnewquotation.php file receives them like:

echo "<a href='insertnewquotation.php?name=$cust_name&producttype=$product_type...'

Then in the insertnewquotation.php you can retrieve them with something like:

$cust_name = isset( $_GET['cust_name'] ) ? $_GET['cust_name'] : "";

Hope that points you in the right direction.

Note: I won't even touch the usage of deprecated mysql_* functions since this is a school project.


EDIT

In your input, you have to assign the value attribute and use PHP tags where appropriate:

<?php
   // Get Customer Name and Filter
   $custName = isset( $_GET['cust_name'] ) ? strip_tags($_GET['cust_name']) : "";
?>
<input name="custname" 
       type="text" 
       value="<?php echo($custName); ?>"> 

NOTE: It is generally not a good idea to use raw query variables before filtering. In this case it is not that problematic, but never ever use raw query string data in a database query. That's just asking for SQL Injection.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top