Jump to content

Recommended Posts

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/">';

Link to comment
https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/
Share on other sites

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/">';
?>

Link to comment
https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/#findComment-236629
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/48393-solved-forms-and-php/#findComment-236638
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.