Results 1 to 10 of 141

Thread: One more: Online Designer?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    Question on using the array to convert it to the db value. Whenever I use a hidden input it doesn't go into the shopping cart information. I don't know why, haven't been able to figure it out, (and would love to use the images as buttons again instead of the radio buttons)!

    Here's what I have coded for changing the font style:
    Code:
    <?php 
    $styleconvert=array('courier'=>'443','verdana'=>'444','amazone bt'=>'445','arial'=>'446','times'=>'447','helvetica'=>'448','sans-serif'=>'449');
    ?>
     
    <input type="hidden" name="optn25" value="<?php $styleconvert[$_POST['FontcardTemplate']]?>">
    <select name="FontcardTemplate" onchange="document.getElementById('cardTemplate').style.fontFamily=this.options[this.selectedIndex].value;">
                                                    <option value="courier">Courier</option>
                                                    <option value="verdana">Verdana</option>
                                                    <option value="amazone bt">Amazone BT</option>
                                                    <option value="arial">Arial</option>
                                                    <option value="times">Times</option>
                                                    <option value="helvetica">Helvetica</option>
                                                    <option value="sans-serif">Sans Serif</option>
                                                    <option value="choose" selected="selected">-- Choose Style --</option>
                                  </select>
    I'm using the font selection to change all text in cardTemplate instead of per line (ex. companyName)....

    It's changing the text, but not the value from what I can see...
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  2. #2
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    FYI - it takes a few reads to understand what you are doing.
    This time I failed. I really dont know what EXACTLY it is you are saying or want.
    Did you use my print trick to see what actially IS in 'FontcardTemplate' POST? Because if optn25 is empty, I THINK thats what you are saying, then you need to see what is getting padssed. Because the array command looks fine.

    Confusing code, because if your select is on the same page, of COURSE it wont work, because nothing has been posted yet. The array stuff needs to be on the page that gets submitted to.

    You have to remember, with PHP, stuff gets loaded in order. It is only with JS that you can go backwards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14