Try searching for php comments instead of remming.
Renaming the file saves rather than deletes everything.
Try searching for php comments instead of remming.
Renaming the file saves rather than deletes everything.
I know how to do comments:
Single Line
//comment goes here
Multi Line
/*
Hello
John
*/
Renaming the file saves rather than deletes everything. <<
Oh you mean I should have done what my gui bot making tool company’s support used to advise me.
They wanted me to save each and every updates of the same project by renaming the file like this:
1st_proj_1
1st_proj_2
And so on.
Ok, I get you. I used to save like that when building the .exe bots. But when I started on php, I used to have different dated folders instead and then save each nights work on the appropriate folder. That way I can refer back to any night’s work. Have stopped doing this for a few mnths now as I got tired creating folders and renaming them aswell as filling my hdd with too many files belonging to the same project. Ah! Another feature I can add to my future combing operation debugging tool. I know how to write all these features with the gui tool to build the .exe tool but it will be a good experiment and learning curve building the .php web version of the tool.
Ok, keep all the feature ideas coming. I am warming up now.
Any other silly mistakes programmers usually make ? Let me know.
Any other measures programmers usually take to save time writing code or debugging ? Let me know.
Actually, let me know whatever idea comes into your mind regarding saving time in programming & debugging. I’ll make a list. Then build the tools. Will save me countless hrs each night from repetitions or silly repetitive mistakes. Irritating mistakes that irritate me and the members & mods (lol!).
Somebody here or elsewhere suggested I use github as that way they can see the changes in my code. I don’t have experience with that site. Must find myself to that site soon and pickup more time saving ideas.
Nowhere this account activation script is dealing with email. It is dealing with a database only.
Even a five year old can tell you that. It means that you are either deliberately underqualified to write a simplest program, or a cunning help vampire trying to make other people do your job at any cost, or simply a troll.
I believe that to ban this person permanently would be the most humane act ever taken on this forum.
[off topic again]
In UK, after high school, students can enroll for university where they are taught how to learn by themselves. After graduation a few continue and enrol for a PhD which basically involves writing a thesis on a unique subject. The thesis normally takes three years to complete.
[/off topic]
Off Topic
You are again inventing ideas to back up your own views. Very many members here are entirely self-taught. By that, I mean that they have used books or online courses to learn a subject in a methodical manner, starting from basics and progressing to more advanced concepts.
Continually asking others to do things for you is not “self-learning”, and you are simply making excuses here.
No, no, no. I did not ask whether the script is likely to return more than one row. I asked, as the quote clearly says, whether the QUERY could return more than one row. That is, are there more rows in your database that meet the selection criteria that you have not retrieved in your script, that are now clogging up the buffer and meaning that you cannot execute the second query. Forget about the script, just run the query and look at the data.
I did not talk about the PHP return keyword, I was just using it as a word. And I was talking about the query, just in case the paragraph above didn’t make it clear.
That’s why I want you to run it from phpmyadmin and post the results. You could just add a line of code to display the number of rows that the first query retrieves if you prefer. That information would have been in the var_dump($stmt_one)
that I asked about.
No, only the person with access to the data (you, in case it’s not clear) can answer that. I know what you intend to do, I know what you want to do, I’m just asking whether it’s possible, in your test data, where things might not quite be as you intend them, that somehow you have more than one row in the database that your query will find.
I would add that self-teaching is based largely on the research. Books and online courses are not enough. They cannnot give you nuances. Any self-taught professional learns largely from the experiment. They try things, see the result, try other things and so on. The ability to run the code in loops and fixing it according to the result is, in my opinion, an essential requirement in both self-teaching and programming. For the most programmers it’s as natural as breathing, so one seldom notice it, but if you look closely at your actions that you’ll admit that the process of programming is a continuous chain of mini-researches:
Given a program doesn’t run in the vacuum, but depends on the environment, it’s impossible to foresee in the book all the problems possible. So, only learning from a book, one is able to create only primitive programs, whereas any complex program requires continuous trial and error.
And where would be the fun in that? As long as people are willing to engage him then let it run. This kind of comedy is gold.
I am surprised cPradio liked your post. And, I am shocked that, you have not only misunderstood my script (which is a very basic one) but gone beserk enough to tell the mods to ban me for good.
I repeat: This script account_activation.php confirms the user’s email and activates their account. That is dealing with email, in my book, even if it does not SendMail.
Look:
if (!isset($_GET[“email”], $_GET[“account_activation_code”]) === true)
How many times have I repeated how my member reg script works ? You don’t bother reading my thread thoroughly and then jump to conclusions all of a sudden now and then dropping by. Then without giving any proper solutions or making any contributions you start making accusations which I am now getting fed-up off.
And now finally, you’re asking for banning! Just great!
Quite frankly, I’m not going to even bother with you. If you have any doubts about my claims regarding how my script works then you can always start at post number 1 and then work your way down to this post just like others have done.
Good day!
In other words, those who are engaging with me are circus clowns and I’m the king’s jester am I who are entertaining you and amusing you enough to make silly an offending comment like that disrespecting everyone who has BOTHERED to contribute to this thread in the last 6 months ?
Just what exactly is tickling you enough to consider the works of all those who have contributed to this thread in the last 6 months, comedy ? If you consider every engagements here to be a joke then you’re in the wrong place. Best you go and watch the 3 stooges somewhere and entertain yourself there. This is not the place to watch comedy as you put it.
There is a saying: Look at your hand. Not all fingers are the same length.
(Meaning, everyone’s not the same in terms of intelligence & wisdom, character & behaviour, patience, etc.).
You need patience to learn programming.
Look how far you have stuck to this thread. Nearly baby sitting it every day. Look how much you have contributed without complaining that much. You, droopsnoot, cpradio, sama74, technobear have long patience and have come this far to nearly 300 posts in 6 mnths.
Again, not all fingers in your palm are the same.
There is a saying that, that person is not the strongest who is physically built. It’s the one who knows how to control his temper (and never lashes out and offends others) is the strongest.
Yes, but they all had a background in programming as they studied some form of programming in school. Whereas I did not.
If you learn C/C++ in school then it is not that difficult to learn php all by yourself by reading books without attending class.
Try becoming a rocket scientist reading books and attending no classes.
Or better, try learning Martial Arts by simply reading books if you have no experience in that field atall.
I’m afraid, I’ll do better in that field to learn a new style (eg. Aikido) by simply reading a book at home since I have a fair background in MA (Karate, Kungfu) due to attending classes over 2 decades ago.
I think you now understand my point.
Again, you are making assumptions based on nothing. I can’t speak for anyone else, but everything I know about computers, the Internet and web development is entirely self-taught. I have no formal education in those subjects.
So you’ll understand if I disagree with you that it can’t be done.
Everything you have mentioned in your post is good advice I agree. What makes you think I dont try any of the steps you mentioned ?
You just proved my point by writing that lengthy article.
Books and online courses are not enough<<
I agree. Reading from tutorial sites is not enough. You need a teacher. I don’t have one. Hence the trouble. I tried the local schools but they don’t have the php course even though they have web design and java and c and c++.
As for learning and gaining experience from experimenting. Well, that is what I am doing and when I get stuck I mention my problems here to see if anyone can spot what I am doing wrong in my experiments or if I’m experimenting the right way or not.
Here’s a question you should ponder:
If learning php is self learnable and you don’t need others’ helps during learning. Then why does this forum exist ? Why do forums like this exist ? It exists so people who get stuck can ask for help to those who have more experience. And, if people need to ask questions in the forums then that is proof enough that self tutoring is not enough. The very moment you ask questions at forums and get answers, your claim to self tutoring goes out the window. Those who help you in the forums sort of start to become your teachers. So, the self learning venture ends here. Learning programming all by yourself without a teacher, especially when you have no experience in the field, is nothing but dilusion.
90% of the world won’t agree with you. That is my opinion. But you are entitled to your opinion.
@droopsnoot.
Sorry, old man. I was in the middle of trying to figure-out how to do as you suggested (PhpMyAdmin) as I don’t have much experience with PhpMyAdmin. But my concentration for tonight is broken. I’m gonna take a break from this forum tonight.
Good night everyone!
UPDATE
Just before quitting for the night, I checked for my webhost’s reply.
You may remember that, on 14th & 15th I was getting no error reporting by php but an http error 500 instead and I suspected something down on my webhost’s side. I opened a ticket and now they reply that there is a syntax error on line 13. I loaded my webpage on my website and I do not see the http error 500 anymore but the syntax error on line 13.
I am now asking the webhost why I was not seeing this syntax error message the last 2 nights and whether their server was down or not. Well, we all know very well that, they will deny their server to be down to prevent my from ditching them or claiming partial refund and so I won’t hold my breath.
I have come to the conclusion that, the trouble was at the webhost’s end the last 2 nights.
Line 13 looks like this:
if ($stmt_one = mysqli_prepare($conn, "SELECT usernames, accounts_activations FROM users WHERE emails = ? AND accounts_activations_codes = ?");
Parse error: syntax error, unexpected ‘;’ in /home/user/public_html/e-id/activate_account.php on line 13
Removing the semi colon from line 13 at the end rids the error. But a new error:
Parse error: syntax error, unexpected ‘echo’ (T_ECHO) in /home/user/public_html/e-id/activate_account.php on line 14
Line 14 looks like this:
echo ‘mysqli_error($conn)’;
Anyway, I will deal with line 14 and try fixing it tomorrow night.
Thanks for reading upto here!
This discussion is starting to get out of hand and include negative personal remarks, which are against the forum guidelines and have been removed. I ask that all members participating in this discussion keep it civil and focus on the topic being discussed.
Come on, what “discussion” you are talking about? A kindergarten dialogues like this one?
– you should run this script locally
– I can not, it is dealing with email but my local host is not configured to send emails
– this script is not sending any emails but only interacts with a database
– blah blah how dare you blah blah I am fed up blah blah
seriously, come on. take a closer look, how many opening parenthesizes do you have, and how many closing ones do you have on line 13? sigh
@colshrapnel, I don’t disagree at all, sadly, that leaves many with two choices, 1. stick it out to eternity constantly explaining every little detail over and over again, or 2. don’t participate in these topics. The first eventually leads itself to the second.
What do you know about “ifs”?
The syntax is typically similar to
if (some conditional test here) {
// code that runs if the condition tests to true
}
What do you know about functions such as mysqli_prepare
?
The syntax is typically similar to
some_function(some argument here);
In case you’re not seeing it, count the opening and closing parentheses and curly quotes.