Jump to content

help in php mysql case


ashis

Recommended Posts

Hello everyone,

I am quite new to this forum. I was performing a project and I faced an akward type of problem.

 

My problem goes like this

file name page1.php //for inputting data from user

<form method = "POST" action = "page1.php">

//here i call the same page1.php due to input provision as per one to many //relations and the traditional format of paper

            <td width="135" height="62" valign="top">

              <input type="text" name="wo_no" value="<?php echo $_POST['wo_no']; ?>">Work Order Number</td>

</form>

//here i call another page fo saving page2.php

<? php

if(isset($_POST['create_rows']))

{

$n = $_POST['t1'];

?>

<form method = "POST" action = "page2.php">

<input type="hidden" name="wo_no" value="<?=$wo_no;?>" />

</form>

 

Now in the page2.php I use following code

<? php

$wo_no = $_POST['wo_no'];

//userchecking, selection of db everything done

//now for insertion

$sql= "insert into wko(wo_no) values ('$wo_no')";

mysql_query($sql) or die(mysql_error());

echo $wo_no;

?>

 

But after saving following type is inserted into the database <?=$wo_no;?>

while echoing in the page2.php following code in running <?=$wo_no;?> instead of the real wo_no inputted by user.

 

I am in the testing phase of this product and I am using wamp for php -mysql environment. Is this some php bug or some changes to be performed within php or apache system.

 

Please help

Regards

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/103827-help-in-php-mysql-case/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.