473,387 Members | 1,365 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,387 software developers and data experts.

Unable to echo POST input

Odisey
14
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 1524
pbmods
5,821 Expert 4TB
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
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...
2
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...
9
by: valeberry | last post by:
index <?php include ("conn.php"); require_once("tabs.php"); ?> <html> <head> <?php tabs_header(); ?> </head> <body>
2
by: kashigal | last post by:
<? session_start(); require("db.php"); mysql_connect(MACHINE, USER, ''); mysql_select_db(DBNAME); $username = $_SESSION; $pwd =$_SESSION;
4
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...
5
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...
1
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...
2
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...
5
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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,...
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...

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.