PHP baseconvert custom user input?

Discussion in 'PHP' started by xparasite9, Jul 16, 2008.

  1. #1
    I've been trying to make a base converter that allows a guest to input a custom frombase and tobase, but every time I try to code these values as variables determined by the form, I get an error.
    Is it possible to do what I'm trying to do, or should I settle for just having the frombase and tobase limited to the common options?
     
    xparasite9, Jul 16, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    
    echo base_convert  ( (string) $_GET['number']  , (int) $_GET['frombase']  , (int) $_GET['tobase']  );
    
    PHP:
     
    Danltn, Jul 17, 2008 IP