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

php variable in html

Hello,

How can I do it that it will recognise the php variable $calendar_dir in:

$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\" method=\"POST\">
<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#000000\"
align=\"center\">
<tr><td>
<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CC0000\">
<tr><td width=\"200\">";

the variable contains a directory i set in a config.php and included on
beginning of the document.
Thanks for the advice
chris


Jul 17 '05 #1
7 10176
On 2003-12-03, Christian <cm***@vianet.ca> wrote:
Hello,

How can I do it that it will recognise the php variable $calendar_dir in:

$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\" method=\"POST\">

action=\"${calendar_dir}calendar.php\"

--
verum ipsum factum
Jul 17 '05 #2
There's nothing wrong with the code fragment you provided. Something else is
preventing $calendar_dir from being seen. Does the assignment to $monthtext1
take place inside a function?

Uzytkownik "Christian" <cm***@vianet.ca> napisal w wiadomosci
news:vs************@corp.supernews.com...
Hello,

How can I do it that it will recognise the php variable $calendar_dir in:

$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\" method=\"POST\"> <table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#000000\" align=\"center\">
<tr><td>
<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CC0000\"> <tr><td width=\"200\">";

the variable contains a directory i set in a config.php and included on
beginning of the document.
Thanks for the advice
chris

Jul 17 '05 #3
Op Wed, 3 Dec 2003 15:16:46 -0500 schreef "Christian"
<cm***@vianet.ca>:
How can I do it that it will recognise the php variable $calendar_dir in:

$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\" method=\"POST\">
<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#000000\"
align=\"center\">
<tr><td>
<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CC0000\">
<tr><td width=\"200\">";

it's easier to use following construction, this way you don't have to
worry anymore about slashing

$monthtext1=<<< EOH
<form name="goto" action="$calendar_dir/calendar.php" method="POST">
EOH;
--
http://www.techtronix.be
Jul 17 '05 #4
I can't see any miss escaped slashes, it wont resolve

Savut

"Clubberboy" <cl********@pandora.be-invalid> wrote in message
news:qk********************************@4ax.com...
Op Wed, 3 Dec 2003 15:16:46 -0500 schreef "Christian"
<cm***@vianet.ca>:
How can I do it that it will recognise the php variable $calendar_dir in:
$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\" method=\"POST\"><table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#000000\"align=\"center\">
<tr><td>
<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"#CC0000\"><tr><td width=\"200\">";

it's easier to use following construction, this way you don't have to
worry anymore about slashing

$monthtext1=<<< EOH
<form name="goto" action="$calendar_dir/calendar.php" method="POST">
EOH;
--
http://www.techtronix.be

Jul 17 '05 #5
this wont help as even you dont use {}, his syntax was good and working

Savut

"Tim Van Wassenhove" <eu**@pi.be> wrote in message
news:bq*************@ID-188825.news.uni-berlin.de...
On 2003-12-03, Christian <cm***@vianet.ca> wrote:
Hello,

How can I do it that it will recognise the php variable $calendar_dir in:
$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\"
method=\"POST\">

action=\"${calendar_dir}calendar.php\"

--
verum ipsum factum

Jul 17 '05 #6
Or you redefined it to "" somewhere before that...
$calendar_dir = "";

Savut

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:yO********************@comcast.com...
There's nothing wrong with the code fragment you provided. Something else is preventing $calendar_dir from being seen. Does the assignment to $monthtext1 take place inside a function?

Uzytkownik "Christian" <cm***@vianet.ca> napisal w wiadomosci
news:vs************@corp.supernews.com...
Hello,

How can I do it that it will recognise the php variable $calendar_dir in:
$monthtext1 =
"
<!-- month heading -------------------------------------------->
<table align=\"center\">
<tr>
<td align=\"left\">
<form name=\"goto\" action=\"$calendar_dir/calendar.php\"

method=\"POST\">
<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"

bgcolor=\"#000000\"
align=\"center\">
<tr><td>
<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\"

bgcolor=\"#CC0000\">
<tr><td width=\"200\">";

the variable contains a directory i set in a config.php and included on
beginning of the document.
Thanks for the advice
chris


Jul 17 '05 #7
Op Thu, 4 Dec 2003 10:57:33 -0500 schreef "Savut" <we***@hotmail.com>:
I can't see any miss escaped slashes, it wont resolve


It was a suggestion, not a solution. You should read better next time
& you should read http://allmyfaqs.com/faq.pl?How_to_post to know how
to post.

--
http://www.techtronix.be
Jul 17 '05 #8

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

Similar topics

5
by: Peter | last post by:
L.S. I am developing a PHP-login script (on Lycos Tripod) that uses Session to pass on variables. Below is the entire (stripped) structure that I use. It opens a page where you can Set and Read...
6
by: BigDadyWeaver | last post by:
I am using the following code in asp to define a unique and unpredictable record ID in Access. <% 'GENERATE UNIQUE ID Function genguid() Dim Guid guid =...
6
by: Serge Myrand | last post by:
Hi everybody, It seems that a variable cannot be assign to HTMLBody field. Am'I doing something wrong? - this line write a bold html phrase in the email body ..HTMLBody =...
5
by: Jim Banks | last post by:
Greetings I'm opening a pop up window with a html form, (in one document) and I want to pass a variable to the html form called from the hyperlink. Here's the code I'm using to pop up the...
2
by: umashd | last post by:
Hi, I am doing a web based project for my graduation. I studied bit of java for backend processesing and javascript for the client. Here is the scenario. In the FORM, I use INPUT TYPE=text...
4
by: Bob T | last post by:
Hi All, I am trying to pass a variable from my VB asp.net script (from for example Sub Page_Load in mypage.aspx.vb) to my Client side script. I have found and looked at a very good example...
2
by: Oberon | last post by:
Why does this not work as it should? I expect index.aspx to show:. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\ChatSimple\db\chatusers.mdb Instead, I get: ...
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
6
by: j.woodcock | last post by:
is there a way of having a file that's name is a variable (eg dependant on the user name) act like a include. i know that you cant define the file for an include asp tag using a variable and that...
2
by: neeebs | last post by:
Hi, I'm not sure if this is a javascript problem per se, but here goes. I have an xsl document with a python function defined within a <script> block. Elsewhere in the xsl file, within a python...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.