Jump to content

How to alter script so button will go to URL not to create account


elgordo1960

Recommended Posts

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>

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

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.

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!

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')); ?>

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 :)

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]

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

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.

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.