Hello All,
I have an input tag that I am populating with data from a database.
My problem is the following:
The data in the database that contains single and double quotes.
What do I do?
Currently, I've tried the following...
input type=text name=collName value='Be'er Shmuel Talmudical Academy'
size=35 maxlength=35
But the above code only displays "Be"
I've tried...
input type=text name=collName value="Be'er Shmuel Talmudical Academy"
size=35 maxlength=35
But that works okay for single quotes, but for double quotes I have
the same problem...
How do I fix this? Should I just stick with double quotes and then is
it possible to escape the double quotes that are in the field?
Thanks!
--
Nathan 6 4325
On 26 Jul 2004 19:09:39 -0700, Nathan Given <ng****@hotmail .com> wrote: Hello All,
I have an input tag that I am populating with data from a database. My problem is the following:
The data in the database that contains single and double quotes.
What do I do?
Currently, I've tried the following...
input type=text name=collName value='Be'er Shmuel Talmudical Academy' size=35 maxlength=35
But the above code only displays "Be"
I've tried...
input type=text name=collName value="Be'er Shmuel Talmudical Academy" size=35 maxlength=35
But that works okay for single quotes, but for double quotes I have the same problem...
How do I fix this? Should I just stick with double quotes and then is it possible to escape the double quotes that are in the field?
Thanks! -- Nathan
Replace ' with ' and " with ", and escape the & instead when
processing the data. A little simpler exercise than escaping all the
characters you can't use in a script.
Nathan Given wrote: I have an input tag that I am populating with data from a database. My problem is the following:
The data in the database that contains single and double quotes.
input type=text name=collName value='Be'er Shmuel Talmudical Academy' size=35 maxlength=35
But the above code only displays "Be"
How do I fix this? Should I just stick with double quotes and then is it possible to escape the double quotes that are in the field?
Depends on the scripting language and your database. It is probably
possible. You'd get more useful help by asking how to do this in a
group dedicated to the particular language you use. If it's PHP,
perhaps this will help: http://us3.php.net/htmlentities
(aside: why do the php folks insist on several different domains that
hold the same info? I seem to get redirected to a us3 or de subdomain
depending on I don't know what. The phase of the moon?)
--
Brian (remove ".invalid" to email me) http://www.tsmchughs.com/
Nathan Given wrote: input type=text name=collName value='Be'er Shmuel Talmudical Academy' size=35 maxlength=35
But the above code only displays "Be"
Place all the values in double quotes. Convert all double quotes within
the text to """:
<input type="text" name="collName"
value="Be'er Shmuel Talmudical Academy is "Great!&qu ot;"
size="35" maxlength="35">
--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
In article <10************ *@corp.supernew s.com>,
Brian <us*****@juliet remblay.com.inv alid> wrote: http://us3.php.net/htmlentities
(aside: why do the php folks insist on several different domains that hold the same info? I seem to get redirected to a us3 or de subdomain depending on I don't know what. The phase of the moon?)
Load balancing server maybe?
--
Kris
<kr*******@xs4a ll.netherlands> (nl)
Kris wrote: Brian wrote: why do the php folks insist on several different domains that hold the same info? I seem to get redirected to a us3 or de subdomain depending on I don't know what.
Load balancing server maybe?
You certainly don't need multiple urls to accomplish that!
--
Brian (remove ".invalid" to email me) http://www.tsmchughs.com/
In <f7************ **************@ posting.google. com>, on 07/26/2004
at 07:09 PM, ng****@hotmail. com (Nathan Given) said: How do I fix this?
Use charater entities for such situations, e.g.,
'
´
&dquote;
input type=text name=collName value='Be'er Shmuel Talmudical
Academy' size=35 maxlength=35
--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>
Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to sp******@librar y.lspace.org This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vlajko Knezic |
last post by:
Not so sure what is going on here but is something to do with the way UTF8
is handled in Perl and/or LibXML
The sctript below:
- accepts a value from a form text field;
- builds XML document around it,
|
by: Lefty Bigfoot |
last post by:
Hello,
I am aware that a lot of people are wary of using scanf,
because doing it improperly can be dangerous. I have
tried to find a good tutorial on all the ins and outs
of scanf() but been unsuccessful.
Is there a well-respected (by the c.l.c crowd) book
or tutorial that really covers scanf in detail?
|
by: Michel Rouzic |
last post by:
I know it must sound like a newbie question, but I never really had to
bother with that before, and I didn't even find an answer in the c.l.c
FAQ
I'd like to know what's the really proper way for input a string in an
array of char that's dynamically allocated. I mean, I wish not to see
any such things as char mystring; I don't want to see any number
(if possible) I just want to declare something like char *mystring; and
then I don't...
|
by: liljencrantz |
last post by:
Hi,
I have a piece of code that uses hashtables to store pointers to
various bits of data. The hashtable sees all pointers as const void *,
while the application obviously uses various other pointer types for
the data. I've run into a warning with the following code:
void hash_remove( hash_table_t *h,
const void *key,
const void **old_key,
|
by: Swinky |
last post by:
Can someone explain to me the proper syntax for requery and where to
input it in my form?
I have a main form "Account-Master" with two subforms: 1.) Contacts
and 2.)TNotes.
The TNotes subform has a list of notes related to the Account-Master
record (a relationship has been established based on the field
CompanyID which exists in both tables).
| |
by: uidzer0 |
last post by:
Hey everyone,
Taken the following code; is there a "proper" or dynamic way to
allocate the length of line?
#include <stdio.h>
#include <errno.h>
int main(int argc, char **argv) {
FILE *fp;
|
by: mattmao |
last post by:
Hi all.
There is a challenge question I encountered recently, which says:
"In plain English, there are six different ways when you want to tell someone else about the current time:
It is five past seven.
It is eleven to ten.
It is half past nine.
It is a quarter past eight.
It is a quarter to ten.
|
by: sukatoa |
last post by:
A86 code (Assembly)
jmp main
main:
mov ah,0h ;Service 0, Captures the input and stores it to register al...
int 16h ; Interrupt 16 BIOS...
mov ah,2h ;Service 2
mov dl,al ;Copy register al to register dl
|
by: mattmao |
last post by:
I am brand new to C#.NET so here is my trial on this lab exercise:
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace lab02exec
{
public class Program
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |