By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

php variable in html

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.