473,545 Members | 2,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to echo POST input

Odisey
14 New Member
Hello,
I am still getting these concepts. Help me learn. What is wrong here? Most echos are for testing.


Thank you,
Odisey


Expand|Select|Wrap|Line Numbers
  1. <?php #index php script 3.4
  2.  
  3. echo '<p> 1 </p>';
  4.  
  5.           require_once ('mysql_connect_wvdiamonds.php'); //Connect to server
  6.  
  7.  
  8. echo '<p> Connected </p>';
  9.  
  10.           $id=1;
  11.  
  12. echo '<p> ID </p>';
  13.  
  14.           $query = "SHOW header FROM details1 WHERE des_id_pg1=$id";
  15.  
  16. echo '<p> Query </p>';    
  17.  
  18.           $result = mysql_query($query);   
  19.  
  20. echo '<p> Result </p>';    
  21.  
  22.           echo "<p> $_POST('$result') </p>"; 
  23.  
  24. echo '<p> Post echo 1</p>';          
  25.  
  26.           ?>
May 27 '07 #1
1 1538
pbmods
5,821 Recognized Expert Expert
Changed thread title to better match contents.

Expand|Select|Wrap|Line Numbers
  1. // Try this:
  2. echo $_POST['varname'];
  3.  
  4. // Instead of this:
  5. echo $_POST('varname');
  6.  
  7. // Also note that if you want to use an array element in a string, you must either omit the quote marks around the key name, or else use curly syntax:
  8. echo "$_POST[varname]";
  9. echo "{$_POST['varname']}";
  10.  
http://php.net/string
May 27 '07 #2

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

Similar topics

6
4624
by: Ian Davies | last post by:
Hi me again, sorry to be a pain. Ive been struggling with this one all day. Hope you can understand whats happening. First my script is below. Have a look and I'll explain at the bottom what it does so far and is failing to do ******************************* <?php session_start(); header("Cache-control: private"); //IE 6 Fix...
2
2102
by: raji20 | last post by:
This is my first page named test.php, In this page iam assigning the value to the session variable username,and I could able to access that value in this page. But when I access the same session variable in the next page named test1.php, the value of the session seems to be empty. Iam using PHP Version 4.3.10 ...
9
2075
by: valeberry | last post by:
index <?php include ("conn.php"); require_once("tabs.php"); ?> <html> <head> <?php tabs_header(); ?> </head> <body>
2
1747
by: kashigal | last post by:
<? session_start(); require("db.php"); mysql_connect(MACHINE, USER, ''); mysql_select_db(DBNAME); $username = $_SESSION; $pwd =$_SESSION;
4
2001
by: rawky1976 | last post by:
Hi, I have a hyperlink which goes to the page below and passes the PK_ID from a query into 'userid'. From this we query the DB and then echo a table with a form; only the textboxes are already populated with the data from the query (in theory)!!! But I get a blank page! I have error reporting on php and mysql but nothing is displayed? <?php...
5
3856
Tarantulus
by: Tarantulus | last post by:
Hi, ok, quick description of the problem, I'm trying to reference the postdata from some checkboxes. Unfortunately the checkboxes are dynamically generated therefore I don't know how many there are and thus can't name them individually. I remember reading that naming them with square brackets (as "name") will automatically create an array...
1
2405
by: Markw | last post by:
Hi folks I think I've got a variable problem but not 100% sure. Background: I took the CMS example from chapter 6 in "Build your Own Database Driven Website Using PHP&MySQL" and have attempted to modify it for use in my own database. It almost works for me LOL. contact.php returns my dive buddies first and last name and gives me the option...
2
2801
by: runway27 | last post by:
i am using a self submitting form <form action="<?php echo $_SERVER; ?>" method="POST" id="test2" name="test1"> i need to do a validation of textfields, checkboxes, radio buttons i am able to read, display and validate textfields after the form has been submitted however i am getting an error for checkbox and radio buttons.
5
6793
by: kailashchandra | last post by:
I am trying to upload a file in php,but it gives me error msg please Help me? My Code is like below:- i have one php file named upload.php and i have another html file named upload.html and inside html i am calling php file upload.php:- <?php
0
7432
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5359
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.