Error setting up simple HTML -> PHP -> MySQL on local server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby Altrea » 16. February 2023 10:17

we cannot tell you anything about your second MySQL / MariaDB installation. You are the only one to choose whether it is still needed or not.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby Nobbie » 16. February 2023 12:05

The main problem is, that you dont know which SQL Installation holds which data. I have no idea, why you dont know it, but that is the problem.

As a last try you should change your PHP code once more with the following connect parameters:

Code: Select all
 $conn = mysqli_connect("localhost", "root", "", "staff", 3307);


As you can see, apply port 3307 and use an empty password. I think, thats the correct setup for the Xampp Installation.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby abc1000000 » 16. February 2023 13:25

I deleted MySQL and XAMPP and reinstalled the latter and now it works! Thanks so much.

My plan is to set up a website on my home computer and migrate it online.

The plan is to incorporate user accounts so people will have to login with username Altrea and password veryhelpful for example. Since I intend to test it on friends first I am planning to create them passwords using a password manager - to save time setting up a registration page (for now). From what I understand the usernames and passwords would be stored in a database on my (at first) home computer (while testing) and later on my GoDaddy server. At the moment since I just installed XAMPP, there is no password protection on the MySQL root user or further layers of security for the individual databases/tables etc.

What steps would you recommend I take for adding security? I won't be using the website to take credit card details for a bit, but I'd like to ensure people can't easily access users' passwords, or the form data they've submitted, or anything else in my database(s). i.e should I create a root password, and (taking into account my coding abilities and desire not to bug you all incessantly) are there further steps I should take?

Thank you!
abc1000000
 
Posts: 12
Joined: 13. February 2023 12:07
XAMPP version: 3.3.0
Operating System: Windows

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby Froosh » 16. February 2023 14:41

Security is a very broad topic that will require research on your part to ensure it fits your purposes. If you later do decide to accept credit cards, that opens a whole new world of requirements. I doubt this forum is the correct place to be gathering information on either topic, as XAMPP is really focused on a local environment.

If you are going down the PHP path, perhaps you might consider platforms like WordPress. You can run that locally with XAMPP as a test/staging environment. When you are ready with a hosting provider, there are ways to take your local content and put it online. From there you can at some point handle logins, payments, and such. Still plenty of things for you to learn, but same as security, there is much to learn.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby abc1000000 » 16. February 2023 15:11

Thank you. How much flexibility does WordPress provide? I suspect there may be areas where it proves useful - lit sounds like they may have a plugin to register users/store their passwords/allow them to login that will be better than me trying to work out how to code that but I would want the ability to customise the pages myself using php/html/css/js since I doubt drag and click can provide all the functionality I want. For example, I believe WordPress makes creating forms and storing user input relatively easy - but I may want to impose conditions such as: all five fields must consist of integers whose product is less than 79. Presumably WordPress doesn't have a "all five fields must consist of integers whose product is less than 79" option so I'd need to code that myself. Thank you.
abc1000000
 
Posts: 12
Joined: 13. February 2023 12:07
XAMPP version: 3.3.0
Operating System: Windows

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby Nobbie » 16. February 2023 19:40

You have a wrong idea about WordPress. It does not provide any of your thoughts, its a so called "CMS" (Contents Management System) and does not provide things as formulars with certain attributes. Actually, i do not like WordPress and i dont use it anymore.

Actually you are at the very very beginning and are asking extremely sophisticated things. That does not match very well. Finally, we are not a WordPress forum or any other CMS Forum, we cannot help you on your decision, which tool to use. Go for a WordPress forum if you have any questions.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Error setting up simple HTML -> PHP -> MySQL on local se

Postby abc1000000 » 16. February 2023 21:03

Thanks for your honesty. Yes, building a website is a lot more difficult than I thought (and I didn't think it would be easy)!

In good news I managed to get it so people can submit their form on my actual website and their responses are stored in a MySQL database. Small acorns. I'll take a couple of days to understand what's going on better and be more careful asking questions here going forward.

Thanks all!
abc1000000
 
Posts: 12
Joined: 13. February 2023 12:07
XAMPP version: 3.3.0
Operating System: Windows

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 144 guests