Author Topic: Link to page fails  (Read 605 times)

0 Members and 1 Guest are viewing this topic.

Offline LassieTopic starter

  • Enthusiast
  • Posts: 307
    • View Profile
Link to page fails
« on: December 04, 2009, 12:38:01 PM »
I am using wordpress to develop a site.
I have some php pages I need to link to and I also need a form action to link to another php page.
I have tried the wordpress forum to no avail so forgive me posting here.
I want the form action to go to the tiny page but it stays on the same page.
I have no errors showing.

My test code is
Code: [Select]
<p>Test Tiny MCE link interview template</p>
<?php
$my_url
=get_bloginfo('template_url').'/tiny.php';
echo 
$my_url;
?>



<form method="post" action="<?php ('$my_url');?>">
<p>
<textarea name="content" cols="50" rows="15">This is some content that will be editable with TinyMCE.</textarea>
<input type="submit" value="Submit" />
<input type="hidden" name="submitted" value="TRUE"/>
</p>

</form>

<p>Link to tiny test page</p>
<?php
$my_url
=get_bloginfo('template_url').'/tiny.php';
echo 
$my_url;
?>
<br />
<a href="<?php ('$my_url');?>">Link to tiny</a>

Offline Scanjo

  • Irregular
  • Posts: 4
    • View Profile
Re: Link to page fails
« Reply #1 on: February 18, 2010, 10:41:13 PM »
I'm new to PHP myself so not sure I can be of any help, but...  Have you tried the link this way?

Code: [Select]
<?php echo "<a href=\"" $my_url "\">Link to tiny</a>";?>

I hope I got the escape codes right...

Not sure how to handle it in the form.