elgordo1960 Posted September 27, 2007 Share Posted September 27, 2007 Hi, first post, be gentle I have a "create account" button on my site which I would like to change the properties so it goes to a particular URL when clicked and not to the create account form. I think the following is the script I need to alter, but I could be way off the mark as I am very new to php. tpl_login_default.php <?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div> </form> Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 27, 2007 Share Posted September 27, 2007 change the bit in red to the url you want it to go to: zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); (make sure you sutround the url with ', like this: 'http://mydomain.com' Quote Link to comment Share on other sites More sharing options...
elgordo1960 Posted September 27, 2007 Author Share Posted September 27, 2007 change the bit in red to the url you want it to go to: zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); (make sure you sutround the url with ', like this: 'http://mydomain.com' Hi, thanks for an amazingly quick reply. Sorry it didn't work...I think I left out some of the code..here is the complete line. <?php echo zen_draw_form('create_account', zen_href_link('http://www.actorxfactor.co.uk/index.php?main_page=document_product_info&cPath=17&products_id=33', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 27, 2007 Share Posted September 27, 2007 surely changing the url would change the page it directs to: <?php echo zen_draw_form('create_account', zen_href_link('http://www.actorxfactor.co.uk/index.php?main_page=document_product_info&cPath=17&products_id=33', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field changing it to: <?php echo zen_draw_form('create_account', zen_href_link('http://www.google.com', '', 'SSL'), 'post', 'onsubmit="return check_form(create_account);"') . zen_draw_hidden_field I would have thought that'd send the form to google. Not that google would take an action with it though. Quote Link to comment Share on other sites More sharing options...
elgordo1960 Posted September 27, 2007 Author Share Posted September 27, 2007 I think this is the script that defines the "CREATE_ACCOUNT" BUTTON ?? <?php echo zen_draw_form('create', zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')); ?> <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CREATE_ACCOUNT, BUTTON_CREATE_ACCOUNT_ALT); ?></div> </form> </fieldset> If that's correct, how should I amend/replace the script to tell the button to go to a specific url ? I appreciate any help as I'm really clutching at straws here! Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 27, 2007 Share Posted September 27, 2007 I'm sure that you need to change that part, but I think I may have ade a slight error. Try removing the 'zen_href_link' part as well. So it looks something like this: <?php echo zen_draw_form('create', 'http://mydomain.com/page_to_submit_form_to', '', 'SSL')); ?> Quote Link to comment Share on other sites More sharing options...
elgordo1960 Posted September 27, 2007 Author Share Posted September 27, 2007 I'm sure that you need to change that part, but I think I may have ade a slight error. Try removing the 'zen_href_link' part as well. So it looks something like this: <?php echo zen_draw_form('create', 'http://mydomain.com/page_to_submit_form_to', '', 'SSL')); ?> That method doesn't work...but the first method you suggested nearly works...but instead of going to the url (I used google as a tst) this is the amendment....<?php echo zen_draw_form('create', zen_href_link('http://www.google.com', '', 'SSL')); ?> this is the result https://www.actorxfactor.co.uk/index.php?main_page=http://www.google.com close but no cigar Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 28, 2007 Share Posted September 28, 2007 oh, it's probably a path directory you need. Try something like: <?php echo zen_draw_form('create', zen_href_link('loginpage.php', '', 'SSL')); ?> or [code]<?php echo zen_draw_form('create', zen_href_link('/loginpage.php', '', 'SSL')); ?> [/code] Quote Link to comment Share on other sites More sharing options...
elgordo1960 Posted September 28, 2007 Author Share Posted September 28, 2007 Great its working (well nearly) just need a bit of tweaking. Thanks for all your help. btw when I use a £ in text on a php file eg £2.49, it displays as A£2.49 (A with squiggle on top) how can this be avoided. Ta Gordon Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 28, 2007 Share Posted September 28, 2007 um.. I actually have the same problem, but only on my local server, using wamp. I haven't figured out the problem yet. Quote Link to comment Share on other sites More sharing options...
elgordo1960 Posted September 29, 2007 Author Share Posted September 29, 2007 um.. I actually have the same problem, but only on my local server, using wamp. I haven't figured out the problem yet. I have been given the solution from another forum the HTML code for the GBP symbol, which is: & #163; remove the space between & and # worked for me. Quote Link to comment Share on other sites More sharing options...
Dragen Posted September 29, 2007 Share Posted September 29, 2007 nah, must be something else for me. I'm not using the html code for the pound sign, just the actual £ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.