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 3344136
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:02:05+00:00 2026-05-18T01:02:05+00:00

The snippet of the PHP script below works for the most part… except for

  • 0

The snippet of the PHP script below works for the most part… except for the fact that $rows[from_location_1] and $rows[‘to_location_1’] are not displaying all of the data.

The data consist of building code (letters) followed by a space then floor number/room number. example: NAC 1/200A. The script is displaying only the building code (NAC)

Note: the statement: echo “$rows[from_location_1]”; show all of the data.

I’m totally stumped after trying everything I can think of and read…

Any ideas as to what’s causing it not to display all of the data and a possible get around will be greatly appreciated…

Thanks Chris

echo '<html>';
echo '<head><title> </title>';
echo '</head>';
echo '<body>';
echo '<form method=post action=xxx>';
echo '<table border=5>';
$rows= mysql_fetch_array($result);
echo '<tr>&lt;th>CIT Number&lt;/th>&lt;td>';
echo "&lt;input type=text disabled value=" . $rows['citnum'] . ">&lt;/td>&lt;/tr>";
echo '&lt;tr>&lt;th>Serial Number&lt;/th>&lt;td>';
echo "&lt;input type=text disabled value=" . $rows['sernum'] . ">&lt;/td>&lt;/tr>";
echo '&lt;tr>&lt;th>Move Date&lt;/th>&lt;td>';
echo "&lt;input type=text value=" . $rows['move_date_1'] . ">&lt;/td>&lt;/tr>";
echo '&lt;tr>&lt;th>From&lt;/th>&lt;td>';
echo "&lt;input type=text value=" . $rows[from_location_1] . ">&lt;/td>&lt;/tr>";
echo '&lt;tr>&lt;th>To&lt;/th>&lt;td>';
echo "&lt;input type=text value=" . $rows['to_location_1'] . ">&lt;/td>&lt;/tr>";
echo '&lt;tr>&lt;th>Comment&lt;/th>&lt;td>';
echo "&lt;input type=text value=" . $rows['comment_1'] . ">&lt;/td>&lt;/tr>";
echo '&lt;/td><td align="center">';
echo '&lt;/td>&lt;/tr>&lt;/table>';
echo '&lt;input type=submit value="Click To update">';
echo '&lt;/form>';
echo '&lt;/body>';
echo '&lt;/html>';
mysql_close($dbconnect);
  • 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-18T01:02:06+00:00Added an answer on May 18, 2026 at 1:02 am

    Your echo statements from the database do not have any quotes around the $rows from the database. Also you should escape values coming from the database

    change lines like

    echo "<input type=text value=" . $rows['comment_1'] . "></td></tr>";
    

    to

    echo "<input type=text value=\"" . htmlspecialchars($rows['comment_1']) . "\"></td></tr>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code snippet written in PHP that pulls a block of text
The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128.
This snippet works well if I try to write in a user directory but
Here is a snippet of CSS that I need explained: #section { width: 860px;
Short story: I'm getting an open_basedir restriction in my php script - a simple
I have the following php code, which has been snipped for brevity. I am
This snippet of Perl code in my program is giving the wrong result. $condition
code snippet: //byte[] myByteArray = byte array from database (database BLOB) myByteArray = (byte[])
The snippet says it all :-) UTF8Encoding enc = new UTF8Encoding(true/*include Byte Order Mark*/);
In the following snippet: public class a { public void otherMethod(){} public void doStuff(String

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.