Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Digital Lifestyle
Web Design and Hosting
Need Help for Pop Up windows
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Murlyn" data-source="post: 8338" data-attributes="member: 184"><p>Hmm... I see what you are saying.. Ok what I would do is submit the form to <?=$_SERVER["PHP_SELF"]?> then parse your post variables</p><p></p><p>[php]</p><p>// Get the number of values in $grades array</p><p>$numGrades = count($_POST['grades']);</p><p></p><p>// Go through every grade value and assign a new variable name</p><p>for ($i=0; $i<$numGrades; $i++)</p><p> $gradeArr[] = "grades{$i}=".$_POST['grades'][$i];</p><p></p><p>// Transform the array into a URL string</p><p>$grades = implode('&', $gradeArr);</p><p></p><p>// You might want to urlencode the string afterwards</p><p>$grades = urlencode($grades);</p><p>[/php]</p><p></p><p>This will stick your array into this form:</p><p></p><p>grade1=value&grade2=value&grade3=value</p><p></p><p>so forth and so forth.. that should help you out a bit there..</p></blockquote><p></p>
[QUOTE="Murlyn, post: 8338, member: 184"] Hmm... I see what you are saying.. Ok what I would do is submit the form to <?=$_SERVER["PHP_SELF"]?> then parse your post variables [php] // Get the number of values in $grades array $numGrades = count($_POST['grades']); // Go through every grade value and assign a new variable name for ($i=0; $i<$numGrades; $i++) $gradeArr[] = "grades{$i}=".$_POST['grades'][$i]; // Transform the array into a URL string $grades = implode('&', $gradeArr); // You might want to urlencode the string afterwards $grades = urlencode($grades); [/php] This will stick your array into this form: grade1=value&grade2=value&grade3=value so forth and so forth.. that should help you out a bit there.. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
Digital Lifestyle
Web Design and Hosting
Need Help for Pop Up windows
Top