Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 679153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:13:42+00:00 2026-05-14T01:13:42+00:00

this is my entire PHP code: <?php if(empty($_POST[‘selid’])) {echo no value selected; } else

  • 0

this is my entire PHP code:

<?php if(empty($_POST['selid']))
        {echo "no value selected";  }
        else 
        {
            $con = mysql_connect("localhost","root","");
            if(mysql_select_db("cdcol", $con))
                {
                    $sql= "SELECT * FROM products where Id = '$_POST[selid]'";

                    if($result=mysql_query($sql))
                    {   

                        echo "<form name=\"updaterow\" method=\"post\" action=\"dbtest.php\">";
                        while($row = mysql_fetch_array($result))
                        { 
                        echo "Id :<input type=\"text\" name=\"ppId\" value=".$row['Id']." READONLY></input></br>";
                        echo "Name :<input type=\"text\" name=\"pName\" value=".$row['Name']."></input></br>";
                        echo "Description :<input type=\"text\" name=\"pDesc\" value=".$row['Description']."></input></br>";
                        echo "Unit Price :<input type=\"text\" name=\"pUP\" value=".$row['UnitPrice']."></input></br>";
                        echo "<input type=\"hidden\" name=\"mode\" value=\"Update\"/>";

                        }
                        echo "<input type=\"submit\" value=\"Update\">";
                        echo "</form>";
                    }
                    else {echo "Query ERROR";}
                }
        }
?>

PROBLEM here is, ….if the value i am getting from database using mysql_fetch_array($result) is like:(say Description is:) “my product”

then;
in input box it shows only “my” the word(or digit)
after “SPACE”(ie blank space) doesn’t get displayed?
can input box like above can display the data with two or more words(separated by blank spaces)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:13:42+00:00Added an answer on May 14, 2026 at 1:13 am
    echo "Unit Price :<input type=\"text\" name=\"pUP\" value=\"".$row['UnitPrice']."\"></input></br>";
    

    You need to enclose value in quotes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

the following code: <? require_once phpQuery.php; $dom = phpQuery::newDocument( <head></head><body>this is ignored</body> ); echo
This is simple, but I am taking an entire directory listing (in PHP with
For some reason my code here (this is the entire thing) doesnt actually render
I have a .php file with HTML code also in it. Through this file
This code reloads the entire page rather than simply replacing the #form element every
I need to escape entire javascript code block using escape() compatible function via PHP,
I need help understanding how to implement this part of PHP code in Ruby.
http://php.about.com/od/finishedphp1/ss/php_login_code_4.htm I am really confused about three particular lines of code in this tutorial
I've been frustrated by this for the entire weekend, plus a day or two,
In JQuery, how we can pass entire $(this) to a functions? Possible?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.