Advertisement

08.30.2006 at 02:14PM PDT, ID: 21973215
[x]
Attachment Details

Can I use a  post value of a variable to get the name of another post variable.

Asked by ginxy33 in PHP Scripting Language, Font Creator

Tags: value, php, post, get, variable

Here is my Code....

while($row = $result->fetch()){ ?> //fetches design

<input type="radio" name='<?php echo $row['design'] ?>' value='accept'>approve
<input type="radio" name='<?php echo $row['design'] ?>' value='reject'>reject
<input type="hidden" name='design[]' value='<?php echo $row['design'] ?>'>
Comments:<input type="text" name="comments[]" style="width:200px;">

<input type='submit' name='submitDesign' value="Submit">

if (isset($_POST['submitDesign'])) {
      
$design =$_POST['designs']; // gets our jpg array
      $com = $_POST['comments']; //gets our comment array
      


if (isset($_POST['submitDesign'])) {

<?php for ($i = 0; $i <$count; $i++){
             $d = $design[$i]; // returns ***.jpg       
             $c =$com[$i]; // returns user comments for ***.jpg
            
             if($_POST['$d'] == 'accept'){
                $approved= 'approved';
             }else($_POST['$d'] == 'reject'){
                   $approved='rejected';
             }

In laymen’s terms, what I am trying to do is get the name from the radio button after it submits. I thought I could grab the variable with a post.
I was trying to come up with the post value of the variable using the hidden field to grab the name of the radio button so I can get the value out of it.
So basically I need something like this $_POST[echo $row['design'] ]


Start Free Trial
 
Loading Advertisement...
 
[+][-]08.30.2006 at 02:28PM PDT, ID: 17424297

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.30.2006 at 11:24PM PDT, ID: 17426577

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 08:54AM PDT, ID: 17430025

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 09:46AM PDT, ID: 17430443

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 10:23AM PDT, ID: 17430743

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 11:13AM PDT, ID: 17431180

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 11:59AM PDT, ID: 17431570

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 01:29PM PDT, ID: 17432309

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP Scripting Language, Font Creator
Tags: value, php, post, get, variable
Sign Up Now!
Solution Provided By: amit_g
Participating Experts: 3
Solution Grade: B
 
 
[+][-]09.01.2006 at 08:06AM PDT, ID: 17437609

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2006 at 01:42PM PDT, ID: 17458869

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2006 at 03:12PM PDT, ID: 17459471

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 06:58AM PDT, ID: 17463136

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 07:00AM PDT, ID: 17463148

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 11:41AM PDT, ID: 17465292

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.06.2006 at 11:44AM PDT, ID: 17465314

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32