• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Windows Explain charactersearch.php? Znote

Jfrye

Mapper, trying to learn scripting
Joined
Jan 8, 2009
Messages
366
Solutions
5
Reaction score
86
Location
Mexico Missouri
I am working on character search page, and I am not understanding it really. I have the search bar working properly. I can type in the name, and the character page shows up just fine.

IF the character does not exist, it goes to the next page and says the character does not exist. That seems to be working properly, but where does it create that page from?

I would like to change the way the page looks if the character does not exist, but I cannot find where that page is.
 
https://github.com/Znote/ZnoteAAC/b...4eaa1473b3/layout/widgets/charactersearch.php
Code:
<div class="sidebar">
    <h2>Character search</h2>
    <div class="inner">
        <form type="submit" action="characterprofile.php" method="get">
            <input type="text" name="name" class="search">
        </form>
    </div>
</div>

https://github.com/Znote/ZnoteAAC/b...203a499844eaa1473b3/characterprofile.php#L546
Code:
//line 13
    if ($user_id !== false)
    {
// lots of code here

// line 544
    else
    {
        echo htmlentities(strip_tags($name, ENT_QUOTES)) . ' does not exist.';
    }
 
Thanks. I finally found it. I still cant figure out how to edit line 544. I am trying to make it say Player xxxx doesnt exist. It currently just says xxxx doesnt exist. When it does this, Im trying to get another search bar to pop up below that text.
 
Something like this would probably work: (format it how you like)

Code:
    <?php
   } else {
     echo 'Player '; echo htmlentities(strip_tags($name, ENT_QUOTES)).' does not exist.'; ?>
    
     <h1>Character search:</h1>
     <div class="inner">
       <form type="submit" action="characterprofile.php" method="get">
         <input type="text" name="name" class="search">
         <input type="submit" name="submitName" value="Search">
       </form>
     </div>
     <?php
   }
} else {
   header('Location: index.php');
}

include 'layout/overall/footer.php'; ?>
 

Similar threads

Back
Top