« first day (2313 days earlier)      last day (2621 days later) » 

12:00 AM
Let's hear it, or make a question
 
Bing?
Yahoo?
duckduckgo?
 
DuckDuckGo?
 
Ever use quickform2?
 
@Nytrix You've never heard of duckduckgo.com before?
 
Believe it or not, I use it.
 
12:01 AM
Oh, I thought that was a question questioning my rhetorical question.
 
No.. I wanted to continue the joke, you where faster
 
nevermind me then
 
basically I am creating an inventory website for myself that will take a name of the item and an amount and add them together and then post it on the bottom of the page so I know how many items to pull. I just want to be pointed to a post/example or something where I can start learning how to code it in php rather than javascript..
I am using bootstrap and I would prefer not to deal with their java queries
 
"java queries"
3
That's gold.
 
there script code can be a hassle
 
12:07 AM
You think javascript is a hassle and you want to learn PHP?
 
no
I think bootstrap is a hassle
 
Bootstrap is a combination of HTML/CSS and Javascript.
 
I know
 
Your sentence boils down to the same thing.
 
bootstrap hard?
 
12:08 AM
You're saying Markup and styling are too difficult so I wish to learn a more complex programming language.
 
Bootstrap just a library of common CSS styles to make development faster.
 
no just want to add two elements in a list in php that is all I would rather deal with that than read through all of bootstraps code
yes I know
 
"read through all of bootstraps code"?
 
lol
 
What you're asking to do would actually be far easier to achieve with javascript than it would be with PHP given that you are knowledgeable of neither, but at the very least already exposed to the former.
 
12:10 AM
Bootstrap can make scaffolding faster. You don't have to deal with floats.
 
Your reasoning is based on a faulty premise and I'm afraid you will be stricken with failure if you proceed down this path. But here you go php.net/language.variables.external
 
I will try the Java route
 
Java is a completely different programming language. Java != Javascript
 
Anthony sticks to learning the basics first.
I think you are trying to do to much. To fast.
 
> CSS/HTML and a couple of lines of javascript are way too complicated for me. Let me go try Java instead.
This deserves an award ^
 
12:13 AM
@Sherif
lol
 
I meant javascript
obviously not java
 
Yea, I know what you meant. It was still funny.
 
thanks for the link though
 
@Anthony let me let you in on a secret. Nothing is hard, everything can be learned.
 
Learn the basics first -> move to more advanced programming things... Don't go to step 2 because you think step 1 is hard.. just my opinion...
 
12:14 AM
I know I just wanted something to read
 
Learn the basics well enough.
 
Because of all the lack of reading material available on javascript?
 
Yes, I know. Be carefull though before you are lost
 
I would rather do it server side than client side anyway
 
You still have to learn. HTML, CSS.
 
12:16 AM
and probably Javascript aswell.
 
YES
 
You gave up on javascript so you sought to start over by learning something even more complicated with the confidence that you would somehow be more successful at that? Just listen to yourself man. That makes no sense. Having failed at the easier route isn't indicative of being more likely to succeed at the more difficult one.
 
I know css and html I didn
t
 
hypocrite here, I thought PHP was easier when I started rather then JS. Warning, it's not.
 
I will go back and redo javascript just want to get the website operational to make my job easier
 
12:19 AM
Everyone learns differently. So maybe try a different way of learning. If books not your thing. Try video tutorials. Meetups, take classes.
 
@Anthony The faulty premise there is that you believe once things start working your job gets easier.
 
I hate JS myself
 
What you lack is perseverance not expertise.
 
But in my experience it's not that one is easier than the other, they're just different
 
There's definitly easier and harder languages out there
 
12:22 AM
I never said there weren't
I am just talking about JS vs PHP
 
Learn programming fundamentals.
 
@Nytrix That's actually a gross misrepresentation of the facts.
 
If you are really fast at understanding and grasping things than maybe you would be think PHP is easier because it's less specific
If you are not but you don't mind writing everything out you might say JS is easier
 
Once you understand programming fundamentals. Picking up languages is a lot easier.
 
@Sherif Sorry, what do you mean with that? Is it not true?
 
12:24 AM
@Nytrix There are languages that allow you to touch a broader spectrum of technology or a greater depth of it, but the languages themselves are just a means to an end. The issue isn't the language at all in any case. It's overwhelming sense of the infinite and fuzzy depth of technology that a language allows you to explore that's a deterrent.
 
@Sherif Ok ok, true. It's more the capability of depth of a language rather then the programming.. True.
 
Not capability. More like culpability.
For example, imagine you're trying to create an array like ["foo" => "bar"] in C for the first time and you know nothing about C, but you know in PHP it's that simple.
Look at all the things C now makes you have to understand in order to get there that PHP never did.
But under the hood they're both doing the same exact thing.
 
Yes, I get your point. I was just trying to point out that C is harder to understand rather than, PHP.
 
That's not true at all.
C is actually far easier to understand than PHP.
Have you read K&R? It's only like a couple of hundred pages.
But understanding a language and doing something with a language are two very different things.
Like I said, the language is just a means to an end.
If you look at it your way, sure I can see how you'd easily be misled to believe that one language can be harder than another.
 
Yes, I'm not using my words correctly.
 
12:31 AM
@Nytrix I know, but I'm not scolding you. I'm just trying to enlighten you. Here's a good way to get a better sense of how to look at this differently: Imagine I asked you the question "What happens when I type www.google.com in my borwser address bar and hit enter? Explain to me everything that happens from the moment I hit the keystrokes to the time the page shows up on my screen."
If you actually try to explain everything that happens there you'll realize how many holes you actually have in your working knowledge of the tech stack. It's almost impossible to answer that question with 100% accuracy.
 
Yes, absolutly. It definitly got me thinking!
This also goes above my programming knowledge a bit.. Haha. Good to think about though.
 
Think of all the things you have to understand to explain it all well: You have to understand how the circuits in your keyboard work (low level circuitry like logic gates and microcontrollers) and then possibly even get into the USB/Bluetooth protocols with a wireless keyboard. Explain how your motherboard bus works, how the CPU works, how RAM and I/O works. How DNS and TCP/IP work. How a router works. How webservers work. It's endless.
So how a programming language seems difficult to you is all about how much of that stack it's touching at any given time and how much it forces you to control or how much control it abstracts away from you.
 
Yes, it's actually somewhat impressive that we need to know just a little bit in order to make a website. Abviously relative to the entire procces.
 
@Nytrix Right, we haven't even gotten into the applied mathematics or theoretical physics of it all.
If you even tried to understand how semiconductors work today you'd want to shoot yourself.
 
12:37 AM
Haha, true
I have a headache now
 
The more you learn all about all these things the easier you find it to learn new programming languages though.
 
lol
 
Because each language usually only touches on a tiny aspect of all that working body of knowledge.
 
Also let's you have a greater understanding of what you are actually doing with what you are programming. Can come in handy sometimes
 
Sure, the deeper the understanding the more you are capable of debugging complex problems.
 
12:41 AM
On the otherhand, my old highschool teacher still knows how program with punch cards, but doesn't know how to properly prevent mysql injection.. There is always the right balance
 
Any conclusion based on a faulty premise in technology usually leads to cataclysmic failures we feel are impossible to solve.
 
My above message I try to say more like, that guy knows the broad spectrum and very basics, but not the specifics anymore.
 
@Nytrix Well, there's also a different way of looking at that. For example, today we use flash drives mostly. You think we've advanced from 50 years ago when we used to use tape drives? Flash drives only have an average lifespan of about 8-12 years. Tape still has an average lifespan of over 50 years.
Sometimes the new is not so good for us ;)
But how can we know unless you understand both.
Here's an even more bleak outlook at what technology has done to us: Parchment has a lifespan of about 1000 years (when you don't ad all the chemicals and use acrylic ink). Stone has a life span over 10,000 years. Yet, we store the inventory of our nuclear waste material on disks that have a lifespan of less than 7 years.
Clearly we are a more advanced society than the ancient people that used stone, eh?
 
Oh man, you are blowing my brains out
You have a great point here, yet I wouldn't want to write my stuff on stone anymore, would you?
 
@Nytrix What happens when these disks that store the nuclear waste inventory fail as a result of natural disaster? You know that nuclear waste remains radio active for over 300 years, right?
 
12:46 AM
It depends on the circumstance and purpose of storing it, in some occasions stone might actually still be better.
 
"Wooops... I open this can of radioactive waste and now I killed everybody"
Yet, 5000 years later we still can read the writings of the ancient Egyptians and Myans.
A people that have died out long before our time.
Just saying: we haven't advanced nearly as much as we think.
To the ancients, we are actually the primitive people. But one must learn more in order to make better decisions, not less.
 
I absolutly agree with that we haven't advanced to primitive people in certain things. In totallity as a society sometimes even..
I'm to tired to think straight right now though, but very interesting way of thinking.
We went from JS vs PHP to ancient society, great!
 
Well, it depends on your perspective, I guess. I mean, the Internet today transmits over a Zetabyte of data every year (that's 1 Billion terrabytes). That's more information than probably any past civilization has ever harnessed. Yet, all this information is mostly stored on disks that have a lifespan less than that of most mammals. It could all be wiped out in an instant leaving no trace.
Future civilizations might not even know we existed if we got wiped out.
 
Yes, so it really depends on it's purpose of storage. I don't think it's important that a zetabyte of data is retracable in the future. Yet, somethings (radioactive waste) are somewhat more important to store in a way with a longer lifespan.
But... We have adapted so much to technology that that will most likely never happen anymore.
 
There's also the fact that since the advent of the personal computer 50 years ago, very little has actually changed about how we interface with computers today. The mouse, the keyboard, the monitor, the GUI, all practically 40+ year old technology that we still continue to rely on.
 
12:55 AM
In our situation right now, we have advanced. In some cases of events, we can't do anything with our advancement anymore though.
 
Even the automobile and the combustion engine are 100+ year old technology that dominates in todays world. We don't make much revolutionary change despite it being at our disposal.
 
Yes, that's so weird to me how some concepts that are there from the start, keep being there in it's advancements. Are there just no better solutions, or are we just blinded by the fact that it's somewhat there already
I actually saw this great talk of someone who pointed out that we have things in our live that could be re-thought to make them better. Often those get overlooked because we adapt and accept the fact that they are like they are.
 
@Nytrix There. 18 years ago a professor from caltech invented a technology that is what is essentially portrayed in the movie "Minority report"and yet the best we've done with this tech today is something called Xbox 360.
We have access to superior technology. It's just that for some reason the powers that be will not allow it to become mainstream.
There's too much money in ancient tech to let it go.
 
Yes, that and I believe it's also something in our brain that doesn't want let go of "how we are used to it".
It's hard to change our ways often, although we know it will be better..
 
1:01 AM
Hello, is that possible in PHP/HTML to write a text such like program code and keep it like it was in input in the output. I mean if there are tabulation and goto the line in the text how is possible to show the same in output. Something which not change the format of the input. (Don't really know how to explain with my basic English I hope you'll understand ! ^^) Thank you in advance
 
@Hexacoordinate-C Yes, it's possible.
 
How can I do it ? I'm looking on google but my keywords seems to be not that good ^^
 
No, no. You only get one question. You just asked if it was possible. You'll have to come back tomorrow to ask another question.
 
Try duckduckgo otherwise
 
But you can phone a friend or ask for a lifeline.
 
1:05 AM
Don't call me, I can't understand your question.
 
@Nytrix I doubt the search engine is the problem.
 
lol
 
It sounds to me you want to do nothing? Oh and, anything is possible
 
They want to create a console-like interface in the browser.
Your powers of deduction need much training.
 
I'm not doing to hot today on the understanding part of my brain
 
1:08 AM
@Sherif where is that written ?
 
It's OK. It was really broken English.
@Hexacoordinate-C Where is what written?
 
I'm just impressed you got the console part of it, now you told me, I get it... But, WHAT?
 
@Sherif chat.stackoverflow.com/transcript/message/35645912#35645912 that I can ask only one question per day?
 
@Nytrix I mostly took a wild guess
 
hahahaha
 
1:10 AM
@Hexacoordinate-C I'm joking. You just asked a very loaded question.
Try being more specific.
 
It's something with input and output, and it's needs to be the same output..
 
Asking someone "How do I write facebook" is not something easily answered by this channel.
That's like, go do some research and come back with a more specific question.
 
Something which doesn't change the format of the input. How can I explain lol
 
"How does a semiconductor work?" - mhuhaha
 
Start by defining what this "format" is, for starters.
 
1:12 AM
You don't want to change anything, so don't? I'm sorry, but that's all I'm getting at here.
 
If I put a python program in the input I want to show it the same way in the output after sending it in the chat
 
Are you trying to display unformatted text in the browser, for example? That would be a use case for <pre> tags.
 
And not in one line with the whole code
 
Look, now we are getting somewhere.
 
@Hexacoordinate-C OK, that would mean you would want to wrap the output in <pre> tags or send a Content-type header of text/plain.
Depending on whether or not the entire payload is to be interpreted as such or just a portion of it.
Also what is this chat you speak of?
 
1:16 AM
I'm learning PHP for a bit more a week and I'm doing a chat in PHP/MySQL to train myself. When I finish to add something which can be useful for chaters I ask me how can I improve a bit more. And this what I'd like to now if that's possible ^^
Also I'm not sure I exactly understood all you said just before ^^
 
Which part?
 
content-type header // text/plain // And the whole sentence "Depending ... it."
 
Just wrap your output from PHP in <pre> tags buddy. Don't worry about it.
 
Do mean I put what is in my echo between <pre> tags ?
 
The part you want to be display preformatted, sure.
 
1:24 AM
<?php echo ?> <pre> <?php htmlspecialchars($donnees['message']);?> </pre> something like that I mean
 
Right idea, the actual code hurts my eyes.
 
Why does it ?
Well it must have an error because I have one lol. I dislike that so much ahah
Well <pre><?php echo htmlspecialchars($donnees['message']);?></pre> doesn't work
 
an error?
 
Well not really an error
Let me show you the difference
So without pre tags:
And with :
So well it works because the text was input like if he was in one line only but this is not what I expected to do lol
 
You'll have to save it with the formatting as well though, you can search how to do that yourself. It's not like MySQL remembers how your text was formatted out of nowhere.
 
1:39 AM
BrainFuck is easier lol
OK thanks ! :)
 
Just think it through, it needs to get the formatting from somewhere, it can't just re-apear out of nowhere if you just safe the next into your database.
 
Because it works as well for code but .. well yeah I need to think deeper on that
This BF code I did by myself in well 10 minutes do the factorial of a number
Time for me to sleep ! See you next time and thank you. I hope tomorrow I'll fix it !
 
You know that there is this forum, somewhere on the internet, where you can ask programming problems/questions.
 
2:04 AM
@Nytrix No! GTFO! Where? I need this!
Tell me your secret source!
 
@Sherif I know, it's this secret, almost nobody knows. Almost like documentation sites.
 
is it room 11.
 
Some say only the best of the best are able to find it, who really knows though...
@Sherif Oh btw, I thought it was worth mentioning that you had that entire conversation with a 17 year old. It's funny to me somehow, thought I would mention it.
 
Not to long ago i was searching for Dependency injection.
And other related OOD STUFF.
When I found a secret google coding challenge.
 
What was it?
 
2:09 AM
It's a way that google uses to recruit people.
You can complete the challenge in JAVA or Phyton.
I didn't even try it.
 
Was it hard?
 
Yeah looked hard.
 
Yes, I was researching it
It doesn't happen on the same keywords eachtime though, right?
 
When I saw that, seemed like my computer had crashed. Maybe my monitor was not working or maybe getting hacked.
I was searching
 
I can imagine, haha. Sneeky google
 
2:14 AM
Di
Clean code
OOP vocabulary
I had watched of that google talk stuff on youtube.
I guess they keep track of your history.
 
Oh man, that's pretty interesting
"I guess" - lol
 
Misko Hevery
I wouldn't even try though, already know. I'm not that good lol
Know that much.
I had also looked up a lot of angular 2 stuff. So many that helped too.
 
Hey hey, we talked before.. like a couple days before..
I believe your entire search habit helps
 
Well Miskey Hevery created Angular
Maybe he created the coding challenge.
 
Yes, you can't acces it directly. You need to be invited : google.com/foobar
That is the link to the test though
 
2:22 AM
yeah
it will give u an error right?
 
Yes, it does
It basically leads me away
 
I'm still able to access it.
 
Ah cool
 
Even if the time ran out.
 
You can probably still try it
 
2:23 AM
ha
I can but it says my invitation had expired.
Keep searching
 
Yes, that's what I get pretty much
 
Would you want to work there?
 
3:08 AM
Nah, with my mindset and plans that I have now. No. Second problem, I'm 17.
 
3:31 AM
@SalOrozco Also do I not live in the US or am in a static position in the world. + not smart enough
 
You told me before
 
I know, but just plenty of reasons not to want to work there
Who knows, some day.
 
Start your own google.
 
Haha, I can always dream :)
For now I am happy I can earn my own living from programming
 
Never settle
Don't be afraid to dream.
What we know of the world today. Will all change, there is sitll so much we don't know.
Why not you, or me or anyone. haha
 
3:36 AM
I definitly am not afraid to try things, I am definitly trying to re-think some process we know as "normal"now
 
Learn the rules. So you can break them.
 
I absolutly agree with that mentality, people often tell me: "why do you think you are the first to think of this". If everyone has that mentality, you never have anything new.
Often, your idea is already there, until it's not.
 
agreed
 
3:59 AM
Ok, so how does it happen that people somehow want to refuse to use password_hash() and password_verify(), even if you give them the explanation why they should..? It's easier then all the other ways they do it, why that resistance?
 
Who?
That is standard.
 
Random people on SO
It's somewhat the same with mysql_ functions, people just keep showing up with them.
 
Probably learning from old resources.
 
Yes I suppose so... It's just somewhat suprising to me
 
When I was learning the basics. Different books had different ways of doing things.
It was a bit confusing.
 
4:02 AM
I mean... in this case I am talking about this question.
 
Oh web service
 
Sal is right there are old textbooks people buy that have sha1 info on password php setup and they probably don't bother looking up the new way of doing it
 
Yes, probably. I mean, I even got straight password saving thaught in my highschool. It's just that most of these people are not just highschool students
 
There was one book that stilled used query.
The author even recommended you to use PDO LOL
 
They should be banned from stores
 
4:08 AM
why not just teach the right way.
 
I am trying to teach people the right way, but the old books with the old information should just not be a thing anymore
 
Or the show you a certain way to do something, but then they tell you but this other way would be better lol
 
Even if you give them articles explaining why to not use those certain methods...
 
@SalOrozco huh? what's wrong with PDO?
 
He is saying that PDO is good, but the book didn't use that.
 
4:22 AM
oh :) was somewhat confused for a moment
 
@FélixGagnon-Grenier I'm talking about old PHP books. Where they would teach you the old query(), but then recommend that you could use PDO lol
 
instead of downright teaching the better way. I see
 
yes
 
You're getting the hang of it
 
Not directly related to your question, but how does that situation in your image even come to exist? — Nytrix 43 mins ago
some people have no shame ^
 
4:26 AM
Hi, Could somebody have a look through this code and let me know why it is not creating the user? I cant see the issue hoping one of you can spot it.

The php runs from an ajax script on the main page.

http://pastebin.com/4RWq6aLY
 
Mornuing
o/
 
\o
 
@GenGen that your ajax response?
 
Thats the main function inside of the php script that the ajax would run. yah
If I place echo's in the steps then the echo's run fine showing that its steping through the code. But when I look at the db there is no user creation.
The ajax gives a 200 okay return
 
Can you echo $sqlnew_user to see if query is made or not
 
4:29 AM
If I echo $username for example it shows me nothing as if the $_Poist is empty
ok. 1 sec
 
Maybe post the entire file.
 
This is the echo.

INSERT into user(mirrname, emailadd, date, username, password,areauser,randomke) values('','','14/02/2017','','','','JACQdPDWM0')

This is what is going in
create_newuser.php?input_name=test&input_useN=testt&input_pass=testtt&input_area=test&input_emai=test
 
such open to sql injection
 
yeah
 
4:33 AM
there is the entire file
 
You wrapped your code in a function ?
Where are you calling the function?
 
at the bottom of the script
CreateTheUser();
 
@GenGen please, take a pause. read this tutorial. it's about PDO. it is very important you realize that you are doing mysql in a very wrong, dangerous way, that lets people inject sql into your queries.
 
^ +1
 
Prepare statements.
 
4:34 AM
The irony, we just talked about this in here
lol
 
will go through the tut a bit later
 
I can't stress out enough how important it is that you do it now. it will also, probably, help you debug and solve your problem.
 
You have to show us the rest of your file.
You are only showing us the function.
 
@sal, I have pasted the entire file for you already
 
The link you gave us, just the function.
 
4:37 AM
pastebin.com/mNdhZH6G <-- Shows the test_input function, randomcode generate function and main function.
what other part are you referring to?
The ajax?
 
I see it now.
All those functions should be on another file.
include it.
You have to check if your ajax request came from POST
or GET
 
POST
 
you have to check for csrf
 
pastebin.com/ss1VNHQS <-- ajax function
 
ok @GenGen, if we solve your problem, will you read the tutorial?
 
4:41 AM
lol
 
Yeah, I am already reading through the tut while we are chatting
 
Haha, such a classic
 
because there are a few problems that appear as soon as you paste your code in an editor. first, the $conn in create user is undefined. You don't pass it into your function.
I'd hazard nothing actually runs.
 
Did you check your database?
 
also, you have a typo in $enrypted_password. hence, if the query would run, $encrypted_password would be undefined.
 
4:43 AM
are you sure that is not really creating a user?
 
its not really creating a user.
 
Maybe you are just not getting a response back.
Go on developer options.
go under network.
 
yeah
 
Fire up your ajax call.
Click on the response file.
click the response tap.
 
inside response: object?
 
4:49 AM
Are you using chrome?
 
yeah
 
On the main tap at the top
go over to network
 
ah, respone tab, yep
You want the log thats in there
 
then you have HEADERS | PREVIEW | RESPONSE
yes
 
Good connection<br/>testtesttesttestCaptured data<br/>testrow count is : </br>INSERT into user(mirrname, emailadd, date, username, password,areauser,randomke) values('test','test','14/02/2017','test','','','iPXk3BVhMz')
 
4:52 AM
@GenGen Your questions of today ran out, you have more tommorow
 
@ny
?
 
I'm just kidding around, nvm me
 
hahaha
@Nytrix I will use that from now on lol
you are getting that because of this
echo "row count is : $Existingrow_cnt </br>";
 
the echo is causing an error? Is that what you mean?
 
is not an error
remove that line.
 
4:57 AM
ok, done
 
fire up an ajax call again
See what you get this time?
 
@SalOrozco How are you able to be this calm trying to help this gentleman?
 
Good connection<br/>testtesttesttestCaptured data<br/>testINSERT into user(mirrname, emailadd, date, username, password,areauser,randomke) values('test','test','14/02/2017','test','','','wEfTcHeNz2')
 
lol
 
@Nytrix : Why? I havent done anything wrong and Im still learning.
 
4:59 AM
@GenGen the code you pasted is not the actual code you run, right?
 
It be better if we had the source.
 
I gave you the full php file
 
I'm not critizing you, I'm complimenting @Sal as it's taking a bit of time to solve it.
 

« first day (2313 days earlier)      last day (2621 days later) »