Created
February 3, 2013 17:27
-
-
Save charlietfl/4702700 to your computer and use it in GitHub Desktop.
Random numbers form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<pre>'; | |
print_r($_GET); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Random Numbers</title> | |
<meta charset="utf-8"> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js"></script> | |
<script type="text/javascript" src="test.js"></script> | |
<style> | |
#wrapper{width:600px; margin:50px auto} | |
.form_row{ margin: 10px auto;clear: both;} | |
form{border: 1px solid green;padding: 20px} | |
div.inputs{margin-top:10px;} | |
.form_row .column{float: left;width: 33%} | |
label.error{display: block;} | |
</style> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<div class="choices"> | |
<span class="heading"> Add random number forms: </span> | |
<select id="dropdownadd"> | |
<option value="0">0</option> | |
<option value="1">1</option> | |
<option value="2">2</option> | |
<option value="3">3</option> | |
<option value="5">5</option> | |
<option value="10">12</option> | |
</select> | |
<input type="button" value="Reset" id="reset" /> | |
</div> | |
<div id="dropdowndiv"> | |
<form id="numbers_form" action="form-processor.php" method="GET"></form> | |
<!-- this is where textboxes will appear --> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @charlietfl, you are very nice and good. I used your github and latest JSFiddle files exactly but I still get no array like you previously showed. When I click submit I get nothing returned. Nothing on the webpage changes. I was testing with adding buttons and moving things around but I just get empty arrays and no array has returned the textbox numbers yet. I am not sure what is wrong. Are you using the exact same javascript as you have posted on JSFiddle or did you make some changes? I get no errors in PHP or in Apache. I checked the error logs. This should work just like you said and I have previously used PHP with HTML method and action before and it worked to insert into MySQL. Are you able to insert the numbers into MySQL? I have no idea why this does not work. I will give it to a friend to look. I am using your exact code and it does not return the array with numbers. Is this an associative array? I tried other browsers, too. I am using Chrome mostly. I think my computer is setup properly. I will test on another computer. Would you have any other suggestion as to why it does not work?