• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

Need some quick php help on "echo"

echo "Your order has been processed successfully. ......";

Open in new window


I have this. I would like to redirect to index.php when ok is clicked. How can I do this?

Thanks
0
DantechIT
Asked:
DantechIT
  • 2
  • 2
2 Solutions
 
Marco GasiFreelancerCommented:
Place this little form after the echo:

echo "Your order has been processed successfully. ......";
                                 
<form method='post' action='index.php'>
<input type='submit' name='submit' value='OK' />
</form>

Makes this sense for you?
0
 
DantechITAuthor Commented:
 echo "Your order has been processed successfully. ......";
<form method='post' action='index.php'>
<input type='submit' name='submit' value='OK' />
</form>

Open in new window



I get this error:

Parse error: syntax error, unexpected '<' in /home/content/myserver/orders.php on line 51
0
 
DantechITAuthor Commented:
By the way line 51 is
<form method='post' action='index.php'>

Open in new window

0
 
Marco GasiFreelancerCommented:
What a stupid I am! You have to echo those lines:

 echo "Your order has been processed successfully. ......";
echo "<form method='post' action='index.php'>";
echo "<input type='submit' name='submit' value='OK' />";
echo "</form>";

:-(
0
 
Ahmed MerghaniCommented:
Also you can do it like this:

echo "Your order has been processed successfully. ......";
echo "<a href='index.php'>OK</a>";

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now