a.beam.reach Posted April 24, 2007 Share Posted April 24, 2007 I am very 'green' with PHP! I have a form on another html page and I want to add the user input ( $q =$_POST['q'] ) to the php code below in place of "VARIABLE HERE" I would be grateful for any help on how to do this. <? // SET GALLERY OPTIONS HERE // ----------------------- // Set Gallery options by editing this text: $q =$_POST['q']; $options .= '<simpleviewerGallery maxImageWidth="600" maxImageHeight="600" textColor="0xFFFFFF" frameColor="0x000000" frameWidth="2" stagePadding="40" thumbnailColumns="1" thumbnailRows="5" navPosition="left" title="" enableRightClickOpen="false" backgroundImagePath="" imagePath="http://www.mysite.com/VARIABLE HERE/images/">'; Quote Link to comment https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/ Share on other sites More sharing options...
Glyde Posted April 24, 2007 Share Posted April 24, 2007 Here, this should do it: <?php $q = $_POST['q']; $options .= '<simpleviewerGallery maxImageWidth="600" maxImageHeight="600" textColor="0xFFFFFF" frameColor="0x000000" frameWidth="2" stagePadding="40" thumbnailColumns="1" thumbnailRows="5" navPosition="left" title="" enableRightClickOpen="false" backgroundImagePath="" imagePath="http://www.mysite.com/' . $q . '/images/">'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/#findComment-236629 Share on other sites More sharing options...
a.beam.reach Posted April 24, 2007 Author Share Posted April 24, 2007 Thank you Glyde!!! Wow that was fast. . . . I think you answered my question almost BEFORE I asked it. I had it mostly correct at one time but neglected the period after the $q I have already applied it and tested it. . . . works great! Thank you Quote Link to comment https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/#findComment-236638 Share on other sites More sharing options...
Glyde Posted April 24, 2007 Share Posted April 24, 2007 Well I'm glad I could be of assistance. Feel free to ask any more questions you may have (though it'd be best to make a new post for them) Quote Link to comment https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/#findComment-236642 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.