Jump to content

Single & Double Quotations in Echo with OnClick


Recommended Posts

Trying to make this work, but can't figure out the quotation rules. One site mentioned something about \ xxx \ as an additional means of enclosing something. My button shows up but it doesn't work, just causes a page error. It works fine as plain HTML. I want it inside the PHP code so the buttons line up.

 

<input type="button" onclick="window.location.href='form.php'" value="Add Work Order"></input>

 

echo "<input type='button' onclick='window.location.href=?form.php?' value='Add Work Order'></input>\";

 

PS. I don't actually have question marks around form.php :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.