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

space is not been taken through echo as a value of textbox

Hello guys, my code is like

Expand|Select|Wrap|Line Numbers
  1. $temp="here there is space";
  2. <INPUT maxLength=30 name="txtFirstName" size="28" class="txtNormal" tabindex="4" style="float: left" value=<?php echo $temp; ?>>

But in a value of this textfield gives only "here" instead of "here there is space"....space is not been taken as a value..can anyone suggest me wht to do to eliminate this problem
Aug 13 '07 #1
3 1953
nathj
938 Expert 512MB
Hello guys, my code is like


$temp="here there is space";
<INPUT maxLength=30 name="txtFirstName" size="28" class="txtNormal" tabindex="4" style="float: left" value=<?php echo $temp; ?>>


But in a value of this textfield gives only "here" instead of "here there is space"....space is not been taken as a value..can anyone suggest me wht to do to eliminate this problem

Hi,

Try this instead:
[php]
<?php
$temp="here there is space";
echo '<INPUT maxLength=30 name="txtFirstName" size="28" class="txtNormal" tabindex="4" style="float: left" value="'.$temp . '"> ' ;
?>
[/php]

Putting the whole line in PHP works a treat, and makes it easier to read later on.

Cheers
nathj
Aug 13 '07 #2
Thanks Nathj,
Its workin..perfectly..
Aug 14 '07 #3
nathj
938 Expert 512MB
Thanks Nathj,
Its workin..perfectly..
No worries, glad to have helped.

nathj
Aug 14 '07 #4

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

Similar topics

13
by: dogu | last post by:
Noob alert. Code is below. File is saved as a .php. What I'm trying to do: User uses 'select' box drop down list to pick a value. Value ($site) is derived from a db query. This works fine....
11
by: PC Datasheet | last post by:
How do I get the Len function to count a space at the end of a string? For example, if I enter AB(space), how do I get Len to return 3 instead of 2? Thanks, Steve
4
by: | last post by:
The title is maby a bit strage, I had problem coming up with a title that explain my problem. I have a variable $myvar="TEST 123" I would like to use this variable as a default value in a...
8
by: chrisoftoday | last post by:
Hi, I'm having trouble with some white space that's appearing in my table. I can't seem to spot the problem, it'd be great if someone could help. The HTML code (ignore the PHP, it shouldn't be...
9
by: MS | last post by:
I am a newbie to PHP so hopefully this is a easy question. I am pulling data off of one server, which holds our data base and posts it to my PHP page. I have the following code on my php page:...
3
by: 2Dcube | last post by:
Hello, I'm doing some PHP and MySQL, and have a very simple question. How do you echo a long space? When I use echo " ": , it gets echo'd as only one space... Using echo " "; echo " ";...
1
by: brandoncall | last post by:
Hi, I am displaying a bunch of pictures on my website and I would like to sort them by a Date Picture Taken key. I have looked into exif data and I wrote a little code that just prints all the...
7
by: lawrence k | last post by:
I've got a music studio for a client. Their whole studio is run with Macintosh computers. Macintosh computers allow file names to have open white spaces, such as "animal hospital.mp3". I have a...
2
by: asmpic | last post by:
Hi, I stumbled upon a script on the internet that monitors disk space and if it reaches a certain percentage being full it send an email. However, the problem I encountered was that one of the file...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.