Array Specialist Needed

Completed Posted Nov 28, 2011 Paid on delivery
Completed Paid on delivery

BEFORE BIDDING:

YOU MUST BE ABLE TO COMPLETE A WORKING SCRIPT THAT COMPLETES THE TASK CORRECTLY.

YOU MUST BE ABLE TO TEST YOUR OWN SCRIPT, I CHARGE $200 PER MINUTE TO USE MINE.

IF YOUR SCRIPT DOES NOT WORK YOU WILL NOT BE PAID FOR IT, SO DO NOT BID IF YOU CANNOT COMPLETE.

I WILL NOT PAY FOR INCOMPLETE WORK.

TELLING ME THAT YOUR SCRIPT SHOULD WORK DOES NOT MEAN YOU SHOULD BE PAID FOR IT.

THE REALITY THAT YOUR SCRIPT DOES NOT WORK IS NON-NEGOTIABLE.. IE. BELIEF THAT YOUR SCRIPT WORKS DOES NOT MAKE IT SO, IT MUST ACTUALLY DO THE TASK IN REALITY ALSO.

MY COMPANY IS NOT A CHARITY ORGANIZATION AND DOES NOT PAY OUT OF CHARITY.

So, if you understand the above, please continue.

>>>>>Current text below:

$expectedValues = array("11/11/2011", "11/12/2011", "11/13/2011");

$selectionArr['11/11/2011'] = array('Massage', 'Something', 'Plumb Bath');

$selectionArr['11/12/2011'] = array('Massage', 'Facial', 'Something', 'Swiss Massage');

$selectionArr['11/13/2011'] = array('Massage', 'Facial', 'Something', 'Swiss Massage', 'Deep Tissue');

if (isset($_POST['data']) and in_array($_POST['data'], $expectedValues)){

$selectedArr = $selectionArr[$_POST['data']];

foreach($selectedArr as $optionValue){

echo "<option>" . $optionValue . "</option><br>";

$i++;

}

}

<<<<<Current text above.

This text is called from a javascript script. It auto fills a select/dropdown box based on array data. I need the data to be filled dynamically, thus the first select box would select the date, the second select box would supply the new options which would be as stated above, if they are in the row that matches $variable1 below.

This text/script works; however, I need it to be dynamic.

$expectedValues = array("11/11/2011", "11/12/2011", "11/13/2011");

needs to be like

$expectedValues = array(".$variable1.",".$variable1.",".$variable1.");//<<<< this variable needs to auto populate with all the data from the row in the table.. and each $selectionArr[] should auto populate a new row for each $variable1 that exists(below). Data from each variable searches each row.

$selectionArr['$variable1] = array('$variable2','$variable2','$variable2');

$selectionArr['$variable1] = array('$variable2,'$variable2','$variable2','$variable2');

$selectionArr['$variable1] = array('$variable2,'$variable2','$variable2','$variable2','$variable2');

There will obviously have to be a loop and an array format I have not been able to work out.

Thank you in advance for your skills. Please let me know if you require any additional information. The end product is the array aspect of the script.. properly pulling from a table that has rows - row_id, row_date, row_name. row_id is unique however there may be many row_names with the same row_date.

php select/drop down boxes are on [url removed, login to view] and the array is found on [url removed, login to view] with the sql data connecttion and $row= data peices.

>>>>>Working javascript code below.

<script type="text/javascript">

jQuery(document).ready(function(){

jQuery("#selectbox2").hide();

jQuery("#selectbox1").change( function() {

jQuery("#selectbox2").hide();

jQuery("#result").html('Retrieving ...');

[url removed, login to view]({type: "POST",

data: "data=" + jQuery(this).val(),

url: "[url removed, login to view]",success: function(msg){

if (msg != ""){jQuery("#selectbox2").html(msg).show();

jQuery("#result").html("");

}

else{

jQuery("#result").html('<em>No item result</em>');

}

}

});

});

});

</script>

PHP

Project ID: #1315114

About the project

2 proposals Remote project Active Nov 28, 2011

Awarded to:

estorepiker

Please check PM.

$50 USD in 1 day
(13 Reviews)
4.3