469,352 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

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 10017
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Peter | last post: by
6 posts views Thread by Serge Myrand | last post: by
4 posts views Thread by Bob T | last post: by
2 posts views Thread by Oberon | last post: by
6 posts views Thread by j.woodcock | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.