Yenaa
kid a
- Pronoun
- he
Hi.
For my site, I've been using a PHP Sprite Generator, where you input the Pokemon's name, number (without leading zeros) and number (with zeros), and I'm worried that it's still too confusing.
This is the form:
Basically, it sends the inputted information to a process page. I have three types of folders containing images; four folders where the images are saved by name (ie: dunsparce.png), 6 that are saved by number without leading zeroes (ie: 12.png) and 3 with plain numbers (ie: 097.png). Basically, the form plugs in the inputs in a php and image "sandwhich" like below:
So whatever is put in for name on sprite_finder.php is inputted into a certain string on sprite_finder_results.php. However, if there is no such file, the image destroys itself.
Does anyone know an easier way to do this? The generator can be seen here.
For my site, I've been using a PHP Sprite Generator, where you input the Pokemon's name, number (without leading zeros) and number (with zeros), and I'm worried that it's still too confusing.
This is the form:
PHP:
<form action="sprite_finder_results.php" method="POST">
<input name="name" style="text-transform: lowercase"> <input size="3" name="number" maxlength="3" onkeypress="return inputOnlyNumbers(event)"> <input size="3" name="number2" maxlength="3" onkeypress="return inputOnlyNumbers(event)">
<input type="submit"></form>
Basically, it sends the inputted information to a process page. I have three types of folders containing images; four folders where the images are saved by name (ie: dunsparce.png), 6 that are saved by number without leading zeroes (ie: 12.png) and 3 with plain numbers (ie: 097.png). Basically, the form plugs in the inputs in a php and image "sandwhich" like below:
PHP:
<img src="../images/dp_art/<?php echo $_POST["name"]; ?>.png"
onerror="this.style.display='none'">
So whatever is put in for name on sprite_finder.php is inputted into a certain string on sprite_finder_results.php. However, if there is no such file, the image destroys itself.
Does anyone know an easier way to do this? The generator can be seen here.