Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-30-2017, 05:07 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 68,552
Dinocanid is on a distinguished road
Default

You can get the result of the form when submitted and use the id from there, no need to add anything to the database and call it back if it isn't necessary for what you're trying to accomplish:
PHP Code:
$somevariable $mysidia->input->post("petlist"); 
(Following the example code above)
Now you can use '$somevariable' to get the id of the chosen pet and use it elsewhere in the script; like so:
PHP Code:
if($mysidia->input->post("submit")){
            
$petid $mysidia->input->post("petlist");
/*javascript goes here*/

This is in a case where it gets the id if the user clicks a submit button. If you wanted to do something that updates without reloading/changing pages then I doubt you would use this exact code, but you can still get the id the same way.
__________________
Reply With Quote
 


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 11:22 AM.

Currently Active Users: 273 (0 members and 273 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636