|
| ||||||||||
| Tags: button, html, insert, php, php code, submit |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Inserting PHP into button
HTML Code: <FORM METHOD="LINK" ACTION="../chkout/cart1/"> <INPUT TYPE="submit" class="form-button" VALUE="PHP to go here"> </FORM> PHP Code: Code: <FORM METHOD="LINK" ACTION="../chkout/cart1/">
<INPUT TYPE="submit" class="form-button" VALUE="<?php echo $this->__('There are <a href="%s"><strong>%s items</strong></a> in your cart.', $this->getUrl('chkout/cart1'), $_cart1Quantity) ?>">
</FORM> Last edited by Camdean : 06-01-2010 at 08:27 PM. |
|
#2
| ||||
| ||||
| Re: Inserting PHP into button
Well according to me you cannot use the anchor tag i.e. the <a> inside the button's value attribute. Also you will have to change the text that is outputted by the PHP if you want to display it inside the button than try to remove the html from it. please specify your problem more specifically |
|
#3
| ||||
| ||||
| Re: Inserting PHP into button
Please specify the actual output which you are getting and also specify the output which you want from the html. I think that there is something invalid in your program or function. If you specify it in more details then it will be more easier for me to implement on this problem. If possible try to post the whole program. |
|
#4
| |||
| |||
| Re: Inserting PHP into button
Well i think that i have posted enough codes so that you can easily implement any way i would like to thanks you all and hence i followed the steps suggested by praetor and posting the code below Code: <FORM METHOD="LINK" ACTION="../chkout/cart1/">
<INPUT TYPE="submit" class="form-button" VALUE="<?php echo $this->__('There are <strong>%s items</strong> in your cart.', $this->getUrl('chkout/cart1'), $_cartQuantity) ?>">
</FORM> |
|
#5
| ||||
| ||||
| Re: Inserting PHP into button
In the html the buttons do not work with the links. They are usually used for submitting forms that is It's the action value for the form that decides where the form will be submitted to. I would like to know what the function actually returns and the method you are calling the functions. If you show me the full source code i can help you in this case since it is difficult to implement on this problem with such small segment of code.
__________________ The FIFA Manager 2009 PC Game |
|
#6
| ||||
| ||||
| Re: Inserting PHP into button
hello friend firstly i would like to tell you that you have provided enough information so that any one can implement on a problem like this also try to replace your code with the below code: Code: <button class="form-button" type="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')">
<span><?php echo $this->__('Cart: <a href="%s"><strong>%s items</strong></a>', $this->getUrl('chkout/cart1'), $_cart1Quantity) ?></span>
</button> |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Inserting PHP into button" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use the G button in LG optimus black to lock screen or as camera button | Zh@veri | Portable Devices | 7 | 05-12-2011 08:25 PM |
| Trackpad button and the left mouse button of my MacBook is not working | Eun | Portable Devices | 12 | 26-09-2011 11:01 PM |
| Showing 16 GB when inserting new 250 GB HDD | AbeAalOma | Hardware Peripherals | 5 | 25-06-2011 09:52 PM |
| InPrivate Browsing the go button and File button Open are not working | Afiq | Technology & Internet | 3 | 06-04-2011 08:24 AM |
| Convert Sleep Button in Shutdown button In Vista | Kraker999 | Customize Desktop | 3 | 19-03-2009 11:45 PM |