Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,148 members, 7,811,244 topics. Date: Sunday, 28 April 2024 at 07:30 AM

This Php Is About To Make Me Go Nuts. Pls Help - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / This Php Is About To Make Me Go Nuts. Pls Help (1716 Views)

Am Good In Html5 And Css3 Javascript Nd Php Is My Greatest Problem / Please Help Me In This PHP Pagination Code / Web Developer Needed Urgently. Knowledge Of Php Is An Added Advantage (2) (3) (4)

(1) (Reply) (Go Down)

This Php Is About To Make Me Go Nuts. Pls Help by megatran(m): 5:03pm On Jul 09, 2017
Hi everyone,
I have been learning php in detail and I am understand how to go about the login and registration of users. However my problem is that I am having a hard time echoing other user data such as country, city, age etc from my database. I initially learnt the registration and login part via mysqli. However the crumby tutorials which are confusing are mostly mysql. I have been all this for days and I don't wanna loose it cos I understand that php can bring out the rage in someone.
I am asking for assistance from anyone via whatsapp, facebook or here. Pls do help with baby steps tutorial on how to get this done. I have Googled extensively so I know it will be best for me to get someone to just drive me through the process. Thanks
Re: This Php Is About To Make Me Go Nuts. Pls Help by FrankLampard: 7:29pm On Jul 09, 2017
Re: This Php Is About To Make Me Go Nuts. Pls Help by megatran(m): 5:43pm On Jul 10, 2017
FrankLampard:
Read this

https://www.nairaland.com/2963456/hello-house-lets-little-php

Thanks for the heads up Frank. However I want to learn the mysql or mysqli method of selecting data to be echoed out on a users profile page for example. Switching between methods right now may compound things for me so I need baby steps. I don't mind a whatsapp conversation if you will be so kind to contact me via that media.
Re: This Php Is About To Make Me Go Nuts. Pls Help by Realphilo(m): 9:00pm On Jul 10, 2017
Lolz I know how you feel...

Bro, google searching will make Life easy for you trust me!

Just google "How to ....." you will likey find yourself in stackoverflow. and BOOM you will be on track.

2 Likes

Re: This Php Is About To Make Me Go Nuts. Pls Help by yomibanjo24: 2:14am On Jul 11, 2017
Get the tesseract wordpress theme and most importantly the unbranding plugin for just N3,000.
The unbranding plugin actually costs 50 dollars or 30 dollars(applying a promo code). You can confirm this at their website http://tesseracttheme.com/unbranding-plugin/
Interested individuals can contact me via mail: yomibanjo24@gmail.com or text: 09060045254
You can pay into the account: GTBank Oluwayomi Olabanjo 0149523153 .
Once you pay, just notify me and send me your payment details and email, i'll forward the theme and plugin to you.
Re: This Php Is About To Make Me Go Nuts. Pls Help by michaelwilli(m): 2:44pm On Jul 11, 2017
Post your code.
That is the only way you can be helped

1 Like

Re: This Php Is About To Make Me Go Nuts. Pls Help by segbolon: 4:08am On Jul 12, 2017
You must be skipping steps. You shouldn't learn PHP from stupid web tutorials. Get a book and read it from beginning to the very end. Programming is not one of those things you can passively engage in like watching a TV or reading a novel. There is no shortcut. from your description of your problems, it's obvious you haven't put in the effort.
Re: This Php Is About To Make Me Go Nuts. Pls Help by Nobody: 5:06am On Jul 12, 2017
megatran:
Hi everyone,
I have been learning php in detail and I am understand how to go about the login and registration of users. However my problem is that I am having a hard time echoing other user data such as country, city, age etc from my database. I initially learnt the registration and login part via mysqli. However the crumby tutorials which are confusing are mostly mysql. I have been all this for days and I don't wanna loose it cos I understand that php can bring out the rage in someone.
I am asking for assistance from anyone via whatsapp, facebook or here. Pls do help with baby steps tutorial on how to get this done. I have Googled extensively so I know it will be best for me to get someone to just drive me through the process. Thanks
Post ur code bro.

1 Like

Re: This Php Is About To Make Me Go Nuts. Pls Help by Nobody: 5:36am On Jul 12, 2017
Pls show your code.

1 Like

Re: This Php Is About To Make Me Go Nuts. Pls Help by megatran(m): 12:28pm On Jul 12, 2017
michaelwilli:
Post your code.
That is the only way you can be helped
[
Realphilo:
Lolz I know how you feel...

Bro, google searching will make Life easy for you trust me!

Just google "How to ....." you will likey find yourself in stackoverflow. and BOOM you will be on track.
quote author=gimakon post=58367322]Pls show your code. [/quote]

Hello guys i have being able to get around it. i wasnt using the proper SELECT statement to call values hence the constant error. i havent linked it to a proper login session yet. Hopefully when i do i would be updating everyone here if i have any errors come up.
BTW i tried posting my code earlier and got banned for a week . i dont know if there is a special method of posting codes in here.
Re: This Php Is About To Make Me Go Nuts. Pls Help by Realphilo(m): 3:34pm On Jul 12, 2017
megatran:
[quote author=gimakon post=58367322]Pls show your code.

Hello guys i have being able to get around it. i wasnt using the proper SELECT statement to call values hence the constant error. i havent linked it to a proper login session yet. Hopefully when i do i would be updating everyone here if i have any errors come up.
BTW i tried posting my code earlier and got banned for a week . i dont know if there is a special method of posting codes in here.

I am happy you found solution
Re: This Php Is About To Make Me Go Nuts. Pls Help by segbolon: 2:48am On Jul 13, 2017
megatran:
[quote author=gimakon post=58367322]Pls show your code.

Hello guys i have being able to get around it. i wasnt using the proper SELECT statement to call values hence the constant error. i havent linked it to a proper login session yet. Hopefully when i do i would be updating everyone here if i have any errors come up.
BTW i tried posting my code earlier and got banned for a week . i dont know if there is a special method of posting codes in here.

Use pastebin to post your code. One thing that good programmers do is learn to read error messages. So pay attention as you experience errors so next time you will immediately know what the cause is.
Re: This Php Is About To Make Me Go Nuts. Pls Help by megatran(m): 7:36pm On Jul 15, 2017
Thanks for the assistance. But it seems I am beginning to suck at this. I couldn't connect to database on my computer and I am currently viewing the video tutorial . I wouldn't want to sound negative today. I have a screenshot of the few lines of codes which keeps returning an error on the mysql connect line everytime. I guess you guys have better eyes to note the error because I have checked all over and I can't figure it out

Re: This Php Is About To Make Me Go Nuts. Pls Help by agwaisrael(m): 9:56am On Jul 17, 2017
Whoa!!! Bro! I don't know about others o, but even though notepad++ is beautifully lightweight and easy, use an ide
NetBeans
Re: This Php Is About To Make Me Go Nuts. Pls Help by agwaisrael(m): 10:01am On Jul 17, 2017
If(!$adam=mysqli_connect($host, $username, $password)){
Die(mysqli_error());
}
Re: This Php Is About To Make Me Go Nuts. Pls Help by megatran(m): 3:32pm On Jul 17, 2017
agwaisrael:
If(!$adam=mysqli_connect($host, $username, $password)){
Die(mysqli_error());
}

i dont understand the adam you threw in the code. however i am going to try it and see if it works. thanks.
Re: This Php Is About To Make Me Go Nuts. Pls Help by eofafrica4lyf: 3:57pm On Jul 17, 2017
Hi bro, you seem to have omitted the or between the database initialization code and the "die" statement. Kindly check the first image I have attached and take your cue from it. That's Head First - PHP
The second and third images are just extra so as to understand what was in the first image.

Looking at Israel's code that should work too. You should see the similarity in the one he provided and the one I have provided.

Re: This Php Is About To Make Me Go Nuts. Pls Help by eofafrica4lyf: 4:04pm On Jul 17, 2017
Looking at your code again, you might have been shooting yourself in the foot repeatedly, cos the die statement always runs whatever happens.
It's supposed to only run whenever a SQL statement goes is wrong and returns an error, thus, it should be tied to the first expression(the one that initializes the database).
In PHP and some other languages like Java, I think, it's called throwing an exception.
Re: This Php Is About To Make Me Go Nuts. Pls Help by agwaisrael(m): 8:33pm On Jul 17, 2017
megatran:


i dont understand the adam you threw in the code. however i am going to try it and see if it works. thanks.

For the sake of over simplification, this is how you can use the mysqli api:

$this->link= mysqli_connect($this->host, $this->username, $this->password) or die();
try {
mysqli_query($this->link,"CREATE DATABASE IF NOT EXISTS ".$this->database);
mysqli_select_db($this->link, $this->database);
$this->create_tables();
} catch (mysqli_sql_exception $exc) {
$this->writer(LOG,$exc->getTraceAsString());
}

(1) (Reply)

Let Me Rate/review Your App! / Bad Java Books 4 Beginners / Microcontroller Project: Make An Easy Electronic LED Dice.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 34
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.