View Single Post
Old 10-01-2008, 11:26 PM   #2 (permalink)
jcorradino
The Contributor
 
jcorradino's Avatar
 
Join Date: Sep 2008
Posts: 36
Thanks: 2
jcorradino is on a distinguished road
Default

I would think it would be easier to do it this way

the links would be something like:

(URL)Cleveland#.jpg

and you would have a separate field that tells the range (100 in this case)

your php would look like this:

PHP Code:
$srcImage cleanData($_POST['link']);//always clean user data
$range cleanData($_POST['range']);
$link = @mysql_connect ('server','user','pass')

for (
$i=1;$i<=$range;$i++) {
  
$image str_replace('#',$i,$srcImage);
  
$sql 'INSERT INTO `yourdb`.`table` VALUES (null, "$image");';
  @
mysql_query($sql,$link); //assuming you already made a connection
}
@
mysql_close($link); 
This should do what you were looking for, hope this helps.

Edit: How the hell did you get it to display the link, I keep getting Userwebsite.com - personal website Resources and Information. This website is for sale![1-100].jpg <-that
__________________
Jason Corradino
Applications Developer, Interactive Support - Tribune Technology
J2EE Development, Script Tinkering - Develop, Support, and Maintain Tribune websites.
jcorradino is offline  
Reply With Quote
The Following User Says Thank You to jcorradino For This Useful Post:
Acrylic (10-02-2008)