Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to passing post variable values into array?
    primarykey
    data
    text
    <p>i have a code which is not working properly i want to when <code>user's select country from drop down select list</code>? After form is submitted value should be store into <code>courier array</code>?</p> <p><strong>For Example</strong></p> <p>if user selected Usa then Usa should be match with the <code>abc courier array values</code> if the value are matched to each others then <code>$_SESSION['country1']=$abc;</code>will be create?</p> <p><strong>Senorio</strong></p> <p>i have two different courier companies and i want to passing countries list according to the courier companies to the another page?</p> <p><strong>Index Page</strong></p> <pre><code>&lt;?php session_start(); if(isset($_REQUEST['test'])) { $newcountry=$_POST['country']; //Let's Assume Courier Companies Is Abc $abc=array($newcountry=&gt;'Usa',$newcountry=&gt;'Uk'); //Let's Assume Another Courier Companies Is Xyz $xyz=array($newcountry=&gt;'Singapore',$newcountry=&gt;'Germany'); $_SESSION['country1']=$abc; $_SESSION['country2']=$xyz; if(isset($_SESSION['country1']) &amp;&amp; isset($_SESSION['country2'])){ header('Location:test.php'); }} ?&gt; &lt;form method="post"&gt; &lt;select name="country" id="country"&gt; &lt;option value="Usa"&gt;Usa&lt;/option&gt; &lt;option value="Uk"&gt;Uk&lt;/option&gt; &lt;option value="Germany"&gt;Germany&lt;/option&gt; &lt;option value="Singapore"&gt;Singapore&lt;/option&gt; &lt;input type="submit" name="test" value="Submit" /&gt; &lt;/select&gt; &lt;/form&gt; </code></pre> <p><strong>Test.php</strong></p> <pre><code>session_start(); echo $country2=implode($_SESSION['country1']); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload