PromptBase
Close icon
Explore
Marketing & BusinessDown chevron icon
General
Home
Marketplace
Apps
Create
Hire
Login
Sell
Outlined heart icon
🤖 GPT

Dev Buddy

Dev Buddy gpt prompt mini thumbnail
1Heart icon
Favorites
72Eye icon
Views
TestedTick icon
To use this prompt, you could provide a section of code for an AI system to analyze, along with any relevant context or instructions. The AI system could then generate a summary of what the code does, identify any issues with the code, and suggest improvements that could be made to improve its efficiency or functionality. This prompt could be used for a wide range of programming languages and applications, depending on your specific needs.
...more
$3.99
Get prompt
Add to cart icon
After purchasing, you will gain access to the prompt file which you can use with GPT or the app builder. You'll receive 20 free generation credits with this purchase. By purchasing this prompt, you agree to our terms of service.
1 year ago

Prompt Details

Model
Chat - GPT-3.5 (gpt-3.5-turbo)
Token size
54 ($0.00010 / call)
Example input
<!DOCTYPE html> <html lang="en"> <head>   <title>Steven's Gaming Gallery</title>   <link rel="stylesheet" href = "Style.css">   <link rel="stylesheet" href = "index.css"> </head> <body> <div class = "main">   <div class = "navbar">     <div class = "icon">       <h2 class = "logo">Steven's Gaming Gallery</h2>     </div>     <div class="welcome">     <h1>Welcome to Steven's Gaming Gallery</h1>     </div> <?php function session_is_valid() {   $db = new mysqli("localhost:3036", "root", "", "StevensGamingGallery");   // this looks at the cookies and checks if the session ID exists in our database   $validSession = mysqli_query($db, "select * from sessions where session_id = '" . addslashes($_COOKIE['sgg_session']) . "' and has_logged_out = 'n'");   if (mysqli_num_rows($validSession) == 1) {     $thisSession = mysqli_fetch_assoc($validSession);     // check if no older than 2 hours     if ($thisSession['when_logged_in'] > time()-7200) {       // session valid       return true;     } else {       return false;       // die("sorry your session has expired. please log in again");     }   } else {     return false;     // die("session does not exist");   } } if (session_is_valid()) { ?>     <div class = "menu">       <u1>         <li><a href = "Action.html">Action</a></li>         <li><a href = "Race.html">Race</a></li>         <li><a href = "About.html">About</a></li>         <li><a href = "Cliker.html">Cliker</a></li>         <li><a href = "Arcade.html">Arcade</a></li>       </u1>     </div>     <div class="search">       <input class = "srch" type="search" name="" placeholder="Search Game">       <a href = "#"> <button class="btn">Search</button> </a>     </div>          <div class="logout">       <a href="logout.php">Log out</a>     </div> <?php } else { ?>     <div class = "login">       <h2>         <li><a href = "login.html">Login</a></li>       </h2>     </div>          <div class = "Sign-up">       <h2>         <li><a href = "Sign-up.html">Sign-up</a></li>       </h2>     </div> <?php } ?>   </div> </div>
Example output
Sure, I can help you with that. This section of code appears to be a web page written in HTML and PHP. The HTML code contains a page title, two links to cascading style sheets (CSS), and a body section. Within the body section, there is a div element with the class "main" that contains two other div elements, one with the class "navbar" and the other with the class "welcome". The "navbar" div element contains an icon element and an unordered list with five links to different pages of the website. The "welcome" div element displays a header welcoming the user to the website. The PHP code checks if the user has a valid session by accessing the database using the mysqli extension, which connects to the local host database with the username "root" and password "" (empty string). The session_is_valid function checks if the session ID exists in the database and if the user has logged out or not. If the session ID exists and the user has not logged out, it checks if the session is not older than two hours. If the session is valid, it displays a menu with links to different pages, a search bar, and a logout button. If the session is invalid, it displays a login and sign-up button. There don't appear to be any errors or inefficiencies in the code, although it's worth noting that it assumes a local database and may not be secure against SQL injection attacks. One improvement that could be made is to use prepared statements to prevent SQL injection attacks. Additionally, the code could be made more modular and reusable by separating out the database connection and session checking into separate functions that can be used throughout the website. Finally, adding comments to the code can make it more readable and easier to maintain.
Browse Marketplace