Jump to content

[SOLVED] Forms and PHP


a.beam.reach

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

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.