Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2017, 06:31 PM
p810 p810 is offline
Member
 
Join Date: Apr 2017
Posts: 6
Gender: Unknown/Other
Credits: 1,128
p810 is on a distinguished road
Default

Here is a simplified version.

PHP Code:
if ($mysidia->input->post('buy')) {
    
$chosenOption = (int) $mysidia->input->post('myList');

    for (
$i 1$i $chosenOption$i++) {
        
$mysidia->db->insert('raffle_tickets', array(
            
'owner' => $mysidia->user->username
        
));
    }

It casts the type of $chosenOption to an integer. Like explained above the for loop just iterates over the block of code until the condition is false; i.e. $i (the counter) is greater than $chosenOption.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:26 AM.

Currently Active Users: 1922 (0 members and 1922 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636