I am NOT good with server-side technologies (have a hard time wrapping my mind around them at points). I am pretty decent with PHP. I have a form that offers color options (now in drop-down format, but in future will be an image click). There are multiple choices in the form, for instance you can choose a frame …
via PHP Website Development » Search Results » ajax:
post form values to a phpgd script without refreshing the pa
I am NOT good with server-side technologies (have a hard time wrapping my mind around them at points). I am pretty decent with PHP.
I have a form that offers color options (now in drop-down format, but in future will be an image click). There are multiple choices in the form, for instance you can choose a frame color in one select menu, then choose a top color in another select menu in this illustration. Depending on which page you are on, there can be up to 12 of these choices, all named a,b,c,d…through l.
I have an image that is being created by phpgd library. Here is the current setup for the php gd:
$a = $_POST[‘a’];//1
$b = $_POST[‘b’];//2
$c = $_POST[‘c’];//3
$d = $_POST[‘d’];//4
$e = $_POST[‘e’];//5
$f = $_POST[‘f’];//6
$g = $_POST[‘g’];//7
$h = $_POST[‘h’];//8
$i = $_POST[‘i’];//9
$j = $_POST[‘j’];//10
$k = $_POST[‘k’];//1
$l = $_POST[‘l’];//12
$default = imagecreatefrompng(‘../configurator-testing/11ta-503/default.png’);
$defaulta = imagecreatefrompng(‘../configurator-testing/11ta-503/black_a.png’);
$defaultb = imagecreatefrompng(‘../configurator-testing/11ta-503/black_b.png’);
header(‘Content-Type: image/png’);
$x = imagesx($default);
$y = imagesy($default);
imagecopy($default, $defaulta,0, 0, 0, 0, $x, $y);
imagecopy($default, $defaultb, 0, 0, 0, 0, $x, $y);
imagepng($default);
imagedestroy($default);
imagedestroy($defaulta);
imagedestroy($defaultb);Right now, it only posts a “default” image, which has a black frame, black top. What I want it to do is take the form input, and without refreshing the page or using a submit button, use the submitted values to change what image is created. File names are formatted according to the submitted value (ex. submitted black will correlate to files black_a.php and black_b.php, etc). Here is the form I am testing with:
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
For more info: post form values to a phpgd script without refreshing the pa
PHP Website Development » Search Results » ajax
post form values to a phpgd script without refreshing the pa
L'articolo post form values to a phpgd script without refreshing the pa sembra essere il primo su AutoHotKey.