473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Inserting parameter into a form field

13
Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="add_acq.php" method="POST"> 
  2. <p align="center" style="margin-bottom: 0"><font face="Arial">Enter 
  3. EPS userid:</font></p>
  4. <p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type="text" name="userid" size="20"> 
  5. <br>
  6. <p align="center"><i><b><font face="Verdana" size="4" color="#003399">
  7. Engineering Property System - Upload a File</font></b></i></p>
  8. <br> 
  9. <p align="center">Select a File:</font></p>
  10. <p align="center" style="margin-top: 0"><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  11. <input type="file" name="filename" size="20"></font></p>
  12. <p align="center" style="margin-bottom: 0"><font face="Arial">File Description:</font></p>
  13. <p align="center" style="margin-top: 0"><font face="Arial"> 
  14. <input type="text" name = "descrip" size="20"></font></p>
  15. <p align="center"> 
  16. <input type="submit" value="Upload File"></p>
  17. </form>
  18. </html>
  19. This goes to:
  20. add_acq.php
  21. <?php 
  22. //This is the directory where images will be saved 
  23. $target = "E:/docs/acq08/".$HTTP_POST_FILES['filename']['name'];
  24. //This gets all the other information from the form 
  25. $userid=$_POST['userid'];
  26. $descrip=$_POST['descrip']; 
  27. $file=($_FILES['filename']['name']); 
  28. // Connects to the Database 
  29. if ($c=OCILogon("eps_attach", "eps_attach", "epsdev")) 
  30. {
  31.   echo "Successfully connected to EPS.\n <BR/><BR/>";
  32. else 
  33. {
  34.   $err = OCIError();
  35.   echo "Oracle Connection Error <BR/>" . $err[text];
  36. //Writes the information to the database 
  37. $s = OCIParse($c, "insert into eps.upload_attach values ('$userid', '$file', '$descrip', sysdate, 'ACQ', null)");
  38. OCIExecute($s, OCI_DEFAULT);
  39. //echo "EPS Attachment record created.<BR/>\n"; 
  40. OCICommit($c);
  41. //Writes the file to the server 
  42. if(move_uploaded_file($_FILES['filename']['tmp_name'], $target)) 
  43. //Tells you if its all ok 
  44. echo "Your file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added.<BR/><BR/>Please close this window, and Save the information in EPS.<BR/><BR/>"; 
  45. else { 
  46. //Gives an error if it is not 
  47. echo "Sorry, there was a problem uploading your file.<BR/> <BR/> <BR/> <BR/> <BR/> <BR/>"; 
  48. ?> 
  49.  
This is being run on a windows 2003 Server Enterprise RC 2 machine.
The issue is the following. We want to pull the userid parameter from the url used to call this form. To take the userid parametere from the url, and insert into userid field on the form and pass it to the php.
any help would be much appriciated
Jul 18 '08 #1
22 2307
pbmods
5,821 Expert 4TB
Heya, Gaxman.

To use a variable from the URL, use $_GET. To use a variable from the post form submission, use $_POST.
Jul 18 '08 #2
gaxman
13
Appriciate the advice, but can you show me in code. What am i supposed to put in the form? value="_$GET['userid']" doesnt work and do i set form method as get or post. Also, What abut the HTTP_POST_FILES will get affect that function, because doing what you said still doesnt work? what about parse_url()?
Jul 22 '08 #3
pbmods
5,821 Expert 4TB
You'll want to do this:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="userid" size="20" value="<?php echo $_GET['userid']; ?>">
  2.  
That will only work once, though, because the form submits the userid via post. Instead, you should consider doing this:

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="add_acq.php?userid=<?php echo $_GET['userid']; ?>" method="POST">
  2.  
Jul 23 '08 #4
gaxman
13
still not working properly
any other ideas?
Jul 23 '08 #5
pbmods
5,821 Expert 4TB
What is it doing instead of what you want it to be doing?
Jul 24 '08 #6
gaxman
13
when i put your code in and i put the value of userid in and i hit the upload button it doesnt goto add.php and connect etc. What it does after i click upload is it brings up a window asking to open or save add.php. What i want this script to do is the following:
1. Grab userid from url. Then the user will browse for file, and put a description in that field. Then click upload. It will then take that information and post it to add.php and connect to the database, insert userid/description of file/etc into the table, then save and exit.
I know this can be done, any help will be greatly appriciated.
Jul 24 '08 #7
pbmods
5,821 Expert 4TB
Try storing the User ID in the session instead of trying to pass it in between forms.
Jul 25 '08 #8
gaxman
13
could you please show me code or be a little more detailed with your answer please. would appriciate it
Jul 28 '08 #9
you can look up tons of php session tutorials. I will show you though.

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="add_acq.php" method="POST"> 
  2. <p align="center" style="margin-bottom: 0"><font face="Arial">Enter 
  3. EPS userid:</font></p>
  4. <p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type="text" name="userid" size="20"> 
  5. <br>
  6. <p align="center"><i><b><font face="Verdana" size="4" color="#003399">
  7. Engineering Property System - Upload a File</font></b></i></p>
  8. <br> 
  9. <p align="center">Select a File:</font></p>
  10. <p align="center" style="margin-top: 0"><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  11. <input type="file" name="filename" size="20"></font></p>
  12. <p align="center" style="margin-bottom: 0"><font face="Arial">File Description:</font></p>
  13. <p align="center" style="margin-top: 0"><font face="Arial"> 
  14. <input type="text" name = "descrip" size="20"></font></p>
  15. <p align="center"> 
  16. <input type="submit" value="Upload File"></p>
  17. </form>
  18. </html>
  19. This goes to:
  20. add_acq.php
  21. <?php 
  22. //Start the session
  23.  
  24. session_start();
  25.  
  26.  
  27. //This is the directory where images will be saved 
  28. $target = "E:/docs/acq08/".$HTTP_POST_FILES['filename']['name'];
  29. //This gets all the other information from the form 
  30. $userid=$_POST['userid'];
  31. $descrip=$_POST['descrip']; 
  32. $file=($_FILES['filename']['name']); 
  33. // Connects to the Database 
  34. if ($c=OCILogon("eps_attach", "eps_attach", "epsdev")) 
  35. {
  36.   echo "Successfully connected to EPS.\n <BR/><BR/>";
  37. else 
  38. {
  39.   $err = OCIError();
  40.   echo "Oracle Connection Error <BR/>" . $err[text];
  41. //Writes the information to the database 
  42. $s = OCIParse($c, "insert into eps.upload_attach values ('$userid', '$file', '$descrip', sysdate, 'ACQ', null)");
  43. OCIExecute($s, OCI_DEFAULT);
  44. //echo "EPS Attachment record created.<BR/>\n"; 
  45. OCICommit($c);
  46. //Writes the file to the server 
  47. if(move_uploaded_file($_FILES['filename']['tmp_name'], $target)) 
  48.  
  49. // Put the userid variable in the session, making a session variable
  50. $SESSION["userid"]= $HTTP_POST_FILES['filename']['name'];
  51.  
  52. //Tells you if its all ok 
  53. echo "Your file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added.<BR/><BR/>Please close this window, and Save the information in EPS.<BR/><BR/>"; 
  54. else { 
  55. //Gives an error if it is not 
  56. echo "Sorry, there was a problem uploading your file.<BR/> <BR/> <BR/> <BR/> <BR/> <BR/>"; 
  57. ?> 
  58.  
Jul 28 '08 #10
gaxman
13
you can look up tons of php session tutorials. I will show you though.

Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="add_acq.php" method="POST"> 
  2. <p align="center" style="margin-bottom: 0"><font face="Arial">Enter 
  3. EPS userid:</font></p>
  4. <p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type="text" name="userid" size="20"> 
  5. <br>
  6. <p align="center"><i><b><font face="Verdana" size="4" color="#003399">
  7. Engineering Property System - Upload a File</font></b></i></p>
  8. <br> 
  9. <p align="center">Select a File:</font></p>
  10. <p align="center" style="margin-top: 0"><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  11. <input type="file" name="filename" size="20"></font></p>
  12. <p align="center" style="margin-bottom: 0"><font face="Arial">File Description:</font></p>
  13. <p align="center" style="margin-top: 0"><font face="Arial"> 
  14. <input type="text" name = "descrip" size="20"></font></p>
  15. <p align="center"> 
  16. <input type="submit" value="Upload File"></p>
  17. </form>
  18. </html>
  19. This goes to:
  20. add_acq.php
  21. <?php 
  22. //Start the session
  23.  
  24. session_start();
  25.  
  26.  
  27. //This is the directory where images will be saved 
  28. $target = "E:/docs/acq08/".$HTTP_POST_FILES['filename']['name'];
  29. //This gets all the other information from the form 
  30. $userid=$_POST['userid'];
  31. $descrip=$_POST['descrip']; 
  32. $file=($_FILES['filename']['name']); 
  33. // Connects to the Database 
  34. if ($c=OCILogon("eps_attach", "eps_attach", "epsdev")) 
  35. {
  36.   echo "Successfully connected to EPS.\n <BR/><BR/>";
  37. else 
  38. {
  39.   $err = OCIError();
  40.   echo "Oracle Connection Error <BR/>" . $err[text];
  41. //Writes the information to the database 
  42. $s = OCIParse($c, "insert into eps.upload_attach values ('$userid', '$file', '$descrip', sysdate, 'ACQ', null)");
  43. OCIExecute($s, OCI_DEFAULT);
  44. //echo "EPS Attachment record created.<BR/>\n"; 
  45. OCICommit($c);
  46. //Writes the file to the server 
  47. if(move_uploaded_file($_FILES['filename']['tmp_name'], $target)) 
  48.  
  49. // Put the userid variable in the session, making a session variable
  50. $SESSION["userid"]= $HTTP_POST_FILES['filename']['name'];
  51.  
  52. //Tells you if its all ok 
  53. echo "Your file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added.<BR/><BR/>Please close this window, and Save the information in EPS.<BR/><BR/>"; 
  54. else { 
  55. //Gives an error if it is not 
  56. echo "Sorry, there was a problem uploading your file.<BR/> <BR/> <BR/> <BR/> <BR/> <BR/>"; 
  57. ?> 
  58.  
That didnt fix the problem. Just curiuosly are you guys testing what you tell me or just giving suggestions?
Please test, i would much appriciate it.
Jul 29 '08 #11
gaxman
13
the issue is that everytime i click upload file it doenst run the add_acq.php. it just brings up the window to open the php file or save it or to cancel. why is it doing this any ideas?
Jul 29 '08 #12
pbmods
5,821 Expert 4TB
You need to configure your webserver to execute PHP files.

Are you running Apache or IIS?
Jul 31 '08 #13
gaxman
13
lol, this script works w/o the userid stuff and i already have that enabled. please test this out and any other help would be appriciated
Jul 31 '08 #14
gaxman
13
anyone have any other ideas i would greatly appriciate it?
Aug 5 '08 #15
hi gaxman .....
According to wat i understood from ur question.....

i have a suggestion....

first u have to get ur data from url..... that can be done using $_REQUEST[] or $_GET[]

lets say ur URL is http://localhost/sample.php?id=123456

u get ur id by

$id=$_GET["id"]; or $id=$_REQUEST["id"];

then u want it in ur id field

u can or put it in ur id text field .....

<input type="text" name="txt_id" value="<?=$id?>" size="20">

or u can directly put the value in text field

<input type="text" name="txt_id" value="<?=$_GET["id"]?>" size="20">

then u can get the id value in php by wat method ur using to post from data like get or post

for get
$id=$_GET["txt_id"];

for post
$id=$_POST["txt_id"]
Aug 6 '08 #16
gaxman
13
thank you for timely reply. The problem when everyone tells me to put php in the value field for the text box is the following
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <?
  3. $userid = $_REQUEST["userid"];
  4. ?>
  5. <form enctype="multipart/form-data" action="http://eps09.ccc.northgrum.com/upload/test_add.php" method="POST">
  6. <p align="center" style="margin-bottom: 0"><font face="Arial">Enter 
  7. EPS userid:</font></p>
  8. <p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type="text" name="userid" value="<?=$id?>" size="20"> 
  9. <br>
  10.  
is that for the value on the page in the box what shows is <?=$id?>. No matter if i put <?php $id?> or <?php echo $id ?> it always put the php code in there, it never pulls the value. Any ideas why its doing this?
Aug 6 '08 #17
if ur extracting the field value in the same page the in from tag u have to use


<?php echo $_SERVER['PHP_SELF']?> in the action field of the form

<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" name="frm_pr_entry" id="frm_pr_entry">
Aug 6 '08 #18
gaxman
13
i think your misguided if you can please re-read my original post to see
again this is what i am trying to do
When the user opens upload_acq.html :
Expand|Select|Wrap|Line Numbers
  1. <form enctype="multipart/form-data" action="add_acq.php" method="POST">
  2. <p align="center" style="margin-bottom: 0"><font face="Arial">Enter
  3. EPS userid:</font></p>
  4. <p align="center" style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type="text" name="userid" size="20">
  5. <br>
  6. <p align="center"><i><b><font face="Verdana" size="4" color="#003399">
  7. Engineering Property System - Upload a File</font></b></i></p>
  8. <br>
  9. <p align="center">Select a File:</font></p>
  10. <p align="center" style="margin-top: 0"><font face="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  11. <input type="file" name="filename" size="20"></font></p>
  12. <p align="center" style="margin-bottom: 0"><font face="Arial">File Description:</font></p>
  13. <p align="center" style="margin-top: 0"><font face="Arial">
  14. <input type="text" name = "descrip" size="20"></font></p>
  15. <p align="center">
  16. <input type="submit" value="Upload File"></p>
  17. </form>
  18. </html>
  19.  
it is going to as you open the page put http://www.myserver.com?userid=usern...sonopeningpage. I want the script to the put the usernameofpersonopeningpage to be passed into the form in a hidden field. Then when the user selects the file for upload and gives it a description have all three (usernameofpersonopeningpage,filename,description) pass to add_acq.php. Here it will take these fields, connect to oracle, and insert all three of those into the table and disconnect. So above at the beginning of this thread is the full code for both of the .html and .php files. If you can show me code i would be much appriciated. Thanks
Aug 6 '08 #19
This is the code .... but i strictly suggest that dont just copy the code examine it and do some thinking and use it....

this is wat i did for uploading some product.... image and its description..
wat i am doing is making the uploaded image round cornored with white color as background...

this is only for .jpg image for format you can do some changes using imagecreatefrom fucntion of php for jpg imagecreatefromjpeg(); for png imagecreatefrompng(); and gif imagecreatefromgif()....

Expand|Select|Wrap|Line Numbers
  1.  
  2. <?php
  3. require_once("../comman/connection.php");
  4. require_once("product_group_func.php");
  5. require_once("product_func.php");
  6. $conn=connect();
  7.  
  8. if(isset($_POST["btn_sub"]))
  9. {
  10.  
  11. //get data from form
  12.  
  13. $pro_grp=trim($_POST["sel_pr_grp"]);
  14. $pro_code=trim($_POST["txt_pr_code_add"]);
  15. $pro_name=trim($_POST["txt_pr_name_add"]);
  16. $pro_desc=trim($_POST["txt_pr_desc_add"]);
  17. $pro_price=trim($_POST["txt_pr_price_add"]);
  18. $pro_manu=trim($_POST["txt_pr_manu_add"]);
  19. $save="";
  20. $save_t="";
  21.  
  22.  
  23. //validation in php
  24.  
  25.     if ($pro_grp=="none")
  26.     {
  27.         $errors[] = 'Please Select The Product Group For Product';
  28.     }
  29.  
  30.     if (empty($pro_code))
  31.     {
  32.         $errors[] = 'Please Enter The Product Code';
  33.     }
  34.  
  35.     if (empty($pro_name))
  36.     {
  37.         $errors[] = 'Please Enter The Product Name';
  38.     }
  39.  
  40.     if (empty($pro_desc))
  41.     {
  42.         $errors[] = 'Please Enter The Product Description';
  43.     }
  44.  
  45.     if (empty($pro_price))
  46.     {
  47.         $errors[] = 'Please Enter The Product Price';
  48.     }
  49.     else if (!is_numeric($pro_price))
  50.     {
  51.     $errors[] = 'Please Enter The Price Without $ sign';
  52.     }
  53.  
  54.     if (empty($pro_manu))
  55.     {
  56.         $errors[] = 'Please Enter The Product Manufaturer';
  57.     }
  58.  
  59.  
  60.  
  61.  
  62.     if (count($errors) == 0)
  63.     {
  64.  
  65.  
  66.         if (isset ($_FILES['pr_file_add'])){
  67.               $imagename = $_FILES['pr_file_add']['name'];
  68.               $source = $_FILES['pr_file_add']['tmp_name'];
  69.               $target = "images/full_images/".$imagename;
  70.               move_uploaded_file($source, $target);
  71.  
  72.               $imagepath = $imagename;
  73.               $save = "images/full_images/" . $imagepath; //This is the new file you saving
  74.               $file = "images/full_images/" . $imagepath; //This is the original file
  75.  
  76.               list($width, $height) = getimagesize($file) ; 
  77.  
  78.               $modwidth = 400; 
  79.  
  80.               $diff = $width / $modwidth;
  81.  
  82.               //$modheight = $height / $diff; 
  83.               $modheight = 400;
  84.  
  85.               $tn = imagecreatetruecolor($modwidth, $modheight) ; 
  86.               $image = imagecreatefromjpeg($file) ; 
  87.  
  88.                imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; 
  89.                $white  = ImageColorAllocate ($tn, 255, 255, 255);
  90.  
  91.               imagearc($tn, 33, 33, 70, 70,  180, 270, $white);
  92.               imagearc($tn, 366, 366, 70, 70,  360, 90, $white);
  93.               imagearc($tn, 33, 366, 70, 70,  90, 180, $white);
  94.               imagearc($tn, 366, 33, 70, 70,  270, 0, $white);
  95.  
  96.  
  97.               imagefilltoborder ($tn, 0, 0, $white, $white);
  98.               imagefilltoborder ($tn, 400, 0, $white, $white);
  99.               imagefilltoborder ($tn, 0, 400, $white, $white);
  100.               imagefilltoborder ($tn, 400, 400, $white, $white);
  101.  
  102.  
  103.  
  104.               imagejpeg($tn, $save, 100) ; 
  105.  
  106.               $save_t = "images/thumb_nails/sml_" . $imagepath; //This is the new file you saving
  107.               $file = "images/full_images/" . $imagepath; //This is the original file
  108.  
  109.               list($width, $height) = getimagesize($file) ; 
  110.  
  111.               $modwidth = 100; 
  112.  
  113.              // $diff = $width / $modwidth;
  114.  
  115.               //$modheight = $height / $diff; 
  116.  
  117.               $modheight = 100;
  118.               $tn = imagecreatetruecolor($modwidth, $modheight) ; 
  119.               $image = imagecreatefromjpeg($file) ; 
  120.               imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; 
  121.  
  122.               imagejpeg($tn, $save_t, 100) ; 
  123.               begin();
  124.               if(ins_pr($pro_code,$pro_name,$pro_desc,$pro_price,$pro_manu,$save,$save_t,$pro_grp))
  125.               {
  126.                 commit();
  127.                 $pro_grp="";
  128.                 $pro_code="";
  129.                 $pro_name="";
  130.                 $pro_desc="";
  131.                 $pro_price="";
  132.                 $pro_manu="";
  133.                 $errors[]="Product Added Successfully";
  134.  
  135.                }
  136.               else
  137.               {
  138.               rollback();
  139.               $errors[]="Please Select The Proper Data";
  140.               }
  141.  
  142.           }
  143.  
  144.     else
  145.     {
  146.         $errors[] = 'Please Select The Image To Be Uploaded';
  147.     }
  148.  
  149.  
  150.     }
  151.  
  152. }
  153.  
  154.  
  155. ?>
  156. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  157. <html xmlns="http://www.w3.org/1999/xhtml">
  158. <head>
  159. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  160. <title>Untitled Document</title>
  161. <link href="admin.css" rel="stylesheet" type="text/css" />
  162. <script language="javascript" src="Add_Tech_Specs.js" type="text/javascript"></script>
  163. </head>
  164.  
  165. <body>
  166. <div id="container">
  167. <div id="header"><h1>
  168. Administrator Control Panel <br/>
  169. <span>Add Product</span></h1></div>
  170. <div id="top_nav">
  171. </div>
  172.  
  173. <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data" name="frm_add_pr" id="frm_add_pr">
  174. <span id="back"><a href="javascript:history.go(-1);">back</a></span>
  175. <span style="color:#FF0000; padding-left:300px;"><?=$errors[0]?></span>
  176. <div style="padding-left:200px;">
  177.   <table width="403" border="1" bordercolor="#006600" >
  178.   <tr>
  179.     <td width="166">Product Group*</td>
  180.     <td width="218">
  181.     <select name="sel_pr_grp" id="sel_pr_grp">  
  182.     <option selected="selected" value="none">Select Group</option>
  183.      <?php  $result=sel_pr_grp(); while($row=mysql_fetch_array($result)){?>
  184. <option value="<?=$row[0]?>"><?=$row[2]?></option>
  185. <?php }?>
  186.     </select> </td>
  187.   </tr>
  188.   <tr>
  189.     <td>Product Code*</td>
  190.     <td><input type="text" name="txt_pr_code_add" id="txt_pr_code_add" value="<?=$pro_code?>"/></td>
  191.   </tr>
  192.   <tr>
  193.     <td>Product  Name*</td>
  194.     <td><input name="txt_pr_name_add" type="text" id="txt_pr_name_add" value="<?=$pro_name?>"/></td>
  195.   </tr>
  196.   <tr>
  197.     <td>Product Description *</td>
  198.     <td><textarea name="txt_pr_desc_add" rows="6" wrap="virtual" id="txt_pr_desc_add" ><?=$pro_desc?>
  199.     </textarea></td>
  200.   </tr>
  201.   <tr>
  202.     <td>Product Price*</td>
  203.     <td><input type="text" name="txt_pr_price_add" id="txt_pr_price_add" value="<?=$pro_price?>"/></td>
  204.   </tr>
  205.   <tr>
  206.     <td>Product Manufacturer*</td>
  207.     <td><input type="text" name="txt_pr_manu_add" id="txt_pr_manu_add" value="<?=$pro_manu?>"/></td>
  208.   </tr>
  209.   <tr>
  210.     <td>Product Image*</td>
  211.     <td><input type="file" name="pr_file_add" id="pr_file_add" value="<?=$pr_file_add?>"/></td>
  212.   </tr>
  213.  
  214.  
  215.  
  216.  
  217. </table>
  218.  
  219. <table  border="1" bordercolor="#006600"  width="403" >
  220. <thead>
  221. <tr align="center">
  222. <td colspan="2">
  223. <a href="javascript:Add_Tech_Specs_Func()"><span>Click To Add Techincal Specifications </span></a><input name="spec" id="spec" type="hidden" value="0" /></td>
  224. </tr>
  225. <tr style="text-align:center">
  226. <td width="194">Name</td>
  227. <td width="193">Specification</td>
  228. </tr>
  229.  
  230. </thead>
  231. <tbody id="add_pro_tb">
  232. </tbody>
  233.  
  234. </table>
  235. <table border="1" bordercolor="#006600"  width="403" >
  236.  
  237. <tr>
  238.     <td width="194">Click to Add Product*</td>
  239.     <td width="193"><input name="btn_sub" type="submit" value="Save" />
  240.       <input type="reset" name="btn_clr" id="button" value="Discard" /></td>
  241.   </tr>
  242.  
  243. </table>
  244. </div>
  245. </form>
  246. </div>
  247. </body>
  248. </html>
  249. <?php 
  250.  
  251. disconnect($conn);
  252. ?>
  253.  
  254.  
Aug 6 '08 #20
pbmods
5,821 Expert 4TB
is that for the value on the page in the box what shows is <?=$id?>. No matter if i put <?php $id?> or <?php echo $id ?> it always put the php code in there, it never pulls the value. Any ideas why its doing this?
Are you seeing the <? $userid = $_REQUEST["userid"]; ?> in the source of the page as well?
Aug 6 '08 #21
gaxman
13
no it only shows the wuts in the value field
so for instance on the page it shows
<?php echo $userid ?> in the value box
Aug 7 '08 #22
pbmods
5,821 Expert 4TB
I'm confused.

You're sure if you go to View Source in IE or FF you're not seeing the "<? $userid = $_REQUEST["userid"]; ?>" in the source code as well?

I was going to suggest that your server is just treating the script as an HTML document and outputting it without processing it. But if it's processing some of the PHP and not the rest of it, I'm completely baffled.
Aug 7 '08 #23

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
1
by: Michael Albanese | last post by:
I am building an application to report on-the-job injuries and incidents. There are a lot of Date fields, some of which are optional and can be left blank by the user. I have allowed Nulls on...
2
by: Gary Miller | last post by:
I have a TextBox control with a databings to a dataset.column name. The MaxLength property is 2000 bytes. When I enter data e.g. 1957 bytes and do a Update the screen remains complete, but if I...
1
by: ProDevel | last post by:
Hi, I'm desperately trying to figure out how to take rich-formatted text from a rich text box and store it in a memo field (or any other type of field!) in an Access database. Can anyone help??...
5
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL...
0
by: Jawahar | last post by:
All, I have a form view that allows edit (updates) and Inserts (Add a new detail row) . THe formview is populated via a SqlDatasource that is fitered by value that is passed to the SqlDatasource...
7
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.