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

New ITX (HTML_Template_ITX) user needs help!

I'm just getting started with ITX and am having problems with variables
containing $ and numbers.

The relevant portion of the tpl file is:

<form method="POST">
<p>
<input type="submit" value="Submit" name="Sites">
<!-- BEGIN SITES -->
<input type='checkbox' name='{URL1}' value='ON'>{URL2}<br>
<!-- END SITES -->
</p>
</form>

The relevant portion of the php setting the variables is:

foreach($x as $k=>$v){
$tpl->setVariable('URL1',str_replace(' ','',$v));
$tpl->setVariable('URL2',$v);
$tpl->parseCurrentBlock();
}

The values being set include:

Fast $3B Bank
Fast Internet Only Bank

What I'm getting for output is:

<input type='checkbox' name='FastBBank' value='ON'>'Fast B Bank'<br>
<input type='checkbox' name='FastInternetOnlyBank' value='ON'>'Fast
Internet Only Bank'<br>

What's happening to the $3?

Jul 17 '05 #1
1 1851
It turns out that $ is special within values in ITX and must be
escaped with '\'.
On 8 Dec 2004 11:57:43 -0800, "puff" <rb********@earthlink.net> wrote:
I'm just getting started with ITX and am having problems with variables
containing $ and numbers.

The relevant portion of the tpl file is:

<form method="POST">
<p>
<input type="submit" value="Submit" name="Sites">
<!-- BEGIN SITES -->
<input type='checkbox' name='{URL1}' value='ON'>{URL2}<br>
<!-- END SITES -->
</p>
</form>

The relevant portion of the php setting the variables is:

foreach($x as $k=>$v){
$tpl->setVariable('URL1',str_replace(' ','',$v));
$tpl->setVariable('URL2',$v);
$tpl->parseCurrentBlock();
}

The values being set include:

Fast $3B Bank
Fast Internet Only Bank

What I'm getting for output is:

<input type='checkbox' name='FastBBank' value='ON'>'Fast B Bank'<br>
<input type='checkbox' name='FastInternetOnlyBank' value='ON'>'Fast
Internet Only Bank'<br>

What's happening to the $3?


Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: alwayshouston | last post by:
Hi All! I am working on this very small database and I am confused in the designing a simple form. I only have three tables in the database. First Table: tblExpense Columns: ExpenseID ;...
4
by: jerry.ranch | last post by:
Say, on a data entry form a "HELP" cmbBUTTON that bounces the user off to word file that has help, or is there some other way to do it (like a label object with help on another form) Thanks...
11
by: Matthew | last post by:
Ok let me try to explain this as good as I can. I am creating this application where it contains a userlogin class. The user logs in before entering the main apploication. I want to do audit trails...
1
hpbutterbeer
by: hpbutterbeer | last post by:
We have a Machine Project and my brain is currently in a clouded state. Sorry, I'm just a beginner in C Programming... Text twist is a windows game whose main objective is to form words out of the...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
4
by: Andrew Taylor | last post by:
Hi, I've been using PHP for a long time, I have designed and developed a number of mid-range systems. I've always used a procedural approach. I fully understand the concept of OO, I know all the...
1
by: RussCRM | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
5
by: ibid | last post by:
hi every one just wondering if anyone could help sorry if i seem abit dumb but im a newbie to it all ive got to asign a mail program on my auction site in the config.pl files (i think this is the...
15
by: rhino | last post by:
I've put together a prototype of two-tiered CSS tabs that works really well in IE6, IE7, and FF2. It also works very well in Opera 9.27 _except_ that the placement of the lower tier of tabs is...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

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.