Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:14:00+00:00 2026-06-10T11:14:00+00:00

I am currenty trying to make a script using mysqli, However when i run

  • 0

I am currenty trying to make a script using mysqli, However when i run it, it returns a 500 Internal error, But when i remove the fatch_array, it runs without it.
I have been using PHP.Net mysqli_ Manual.
PHP Code

<?php
{ /* Global Data */
$GetPath = $_GET['p'];
$SqlUser = "root";
$SqlPass = "***********";
$SqlHost = "localhost";
$SqlData = "Site";
}
{ /* Mysql Connect */
$Sql = new mysqli($SqlHost, $SqlUser, $SqlPass, $SqlData);
if ($Sql->connect_error) { die("Sorry, Could not connect (".$Sql->connect_errno.") ".$Sql->connect_error);}
}
{ /* Test */
$Page = $Sql->real_escape_string($GetPath);
$SqlData = "SELECT * FROM pages WHERE Page = '".$Page."'";
$SqlQuery = $Sql->query($SqlData);
$Data = $SqlQuery->fetch_array(MYSQLI_ASSOC);
echo $Data['Title'];
$Sql->close();
}
?>

So what causes this? I used fefore the mysql_/ commands and now I’m switching to mysqli_*

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:14:01+00:00Added an answer on June 10, 2026 at 11:14 am

    Your code is fine. Your query is getting wrong.

    One thing is which is causing it is $GetPath = $_GET['p'];

    Either it’s empty or having a value which making it wrong query.

    Or you are having a wrong table name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a script to run my Rails dev server, but the
I am using vim to make a simple script trying get the output of
so i'm currently trying to implement a currency conversion script using Jquery, curl, ajax
I am trying to create a car make/model form using Javascript or AJAX, problem
I need some help in converting my script from using mysql to mysqli I
I am trying to use the grep command in a python script using the
I'm currently trying to make a register form using mongoDB and nodeJS - I've
I'm trying to make a bash script that will talk to a java program
I'm trying to make a HTTP request from a Adobe Illustrator Script (this question
Im trying to make a script to add an input field when a current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.