SA-MP Forums Archive
UCP/php Help! pls +Rep - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: UCP/php Help! pls +Rep (/showthread.php?tid=507131)



UCP/php Help! pls +Rep - Mavis100 - 16.04.2014

*These codes are part of the UCP.php, UCP.php is a part of UCP web, if you need more to help, just PM me then i'll give your link, pls.*

PHP код:
            if((GetP($id, "Character1") == "None") && (GetP($id, "Character2") == "None") && (getP($id, "Character3") == "None"))
            {
                ?>
                <ul class="breadcrumb">
                  <i class="icon-chevron-right"></i> <li class="active">You do not possess any characters!</li>
                </ul>
                You do not possess any characters, therefore you have no selectable characters.
                <?php
            
}
            else
            {
                
?>
                <ul class="breadcrumb">
                  <i class="icon-chevron-right"></i> <li class="active">Selecting Character</li>
                </ul>
                <form method="POST">
                    <div style="padding-left: 5px;">
                    <?php
                    
for ($i=1$i <= 3$i++)
                    {
                        if(
GetP($id"Character".$i."") != "None")
                        {
                            
?>
                            <label class="radio">
                              <input type="radio" name="selectChar" value="<?php echo $i?>">
                              <?php echo GetP($id"Character".$i.""); ?>
                            </label>
                            <?php
                        
}
                    }
                    
?>
                    </div>
                    <div class="form-actions">
                        <button name="select" type="submit" class="btn btn-small">Select Character</button>
                    </div>
                </form>
                <?php
                
if(isset($_POST['select']) && isset($_POST['selectChar']))
                {
                    
$_SESSION['CLogged'] = GetCharacterID(GetP($id"Character".$_POST['selectChar'].""));
                    echo 
GetMessage("<img src='images/ajax-loader.gif'/> Success:""You have selected ".GetP($id"Character".$_POST['selectChar']."")."."7);
                    echo 
"<meta http-equiv='refresh' content='2.0;url=?page=ucp'>";
                }
            }
When i click on Select Character, The page won't redirect and the page is always staying at there, When i click on back to index, and click on Enter UCP system, and it's keeping on Character Selection

How can i fix this? pls..


Re: UCP/php Help! pls +Rep - Mavis100 - 16.04.2014

BUMP, nobody?


Re: UCP/php Help! pls +Rep - doreto - 16.04.2014

Wrong forum.


Re: UCP/php Help! pls +Rep - sammp - 16.04.2014

Quick tip,

getP($id, "Character3")

the G isn't capitalized, no idea if php is case sensitive or not


-=-=-=-


Try to use header("Location: LOCATION.php"); instead of echo "<meta http-equiv='refresh' content='2.0;url=?page=ucp'>";