-
Posts
14,901 -
Joined
-
Last visited
-
Days Won
177
Content Type
Profiles
Forums
Events
Everything posted by Ingolme
-
I have no problem writing code on my i3 laptop, but I'm a web developer. You don't need something exceptionally fast for web development. What kind of programming are you doing?
-
CSS changes only the appearance of the elements, nothing more. That is its purpose. You need to change the attributes in the HTML itself. If you have a server-side language, you can make one menu and load it into all the pages.
-
They don't allow you to try any SQL commands that would actually modify the database because that would allow people to hack the server. Only reading commands, such as SELECT can be used. I don't think the W3Schools staff provides any way to download their test databases. You'll just have to build your own.
-
We can't see the PHP source code. If it's not working, you'll have to post it here.
-
Browser sniffing is a really bad technique. It's can be easily fooled and isn't able to take future browsers and version updates into account.
-
Yes, you can remove it. When the action attribute is empty or missing, the form submits to the current page. There is no name attribute on the form element, remove that as well.
-
You can put PHP code wherever you want. The HTML doesn't really exist yet while the PHP code is running, but I recommend having the bulk of the PHP code at the top of the page. Even better would be to run all the PHP first and then send any data that needs to be displayed on the website to a template engine.
-
Mail services decide whether to send mail to spam or not based on the headers, subject and content. It doesn't matter what PHP code was used to send the mail.
-
The more modern approach is to make one single page that's responsive. Having two different pages was a technique used when media queries were not as widely supported. If you wonder why such big websites as Yahoo and Facebook do it, it's because transitioning from what they currently have to fully responsive would actually cost a lot of money. They'll likely do it eventually, though.
-
It's impossible to know now whether you gave b a value or not, but computers only do what they're told. If b had a value it's almost certainly because somebody set that value.
-
If you need PHP then now's a good time to learn it. I'm here to help people learn, not write code for them. The W3Schools PHP tutorial even has a section about sending e-mail with PHP.
-
I would suggest learning about SQL injection. Otherwise, your site is very open to hacking.
-
You're asking it for b, the value you set was a b was probably set to 3 earlier.
-
Here's a stackoverflow article about it: http://stackoverflow.com/questions/517970/how-to-clear-python-interpreter-console You can make a lambda to shorten the code: import osclear = lambda: os.system('cls')clear() Then you can call clear() as often as you want
-
The tutorial does have a MySQL section, but you really need to learn the basics, because your current mistakes are with the core syntax of PHP. localhost is not a function, it's a server name, so you would put it as the first parameter of the mysqli_connect function. Once you learn PHP you should know what "parameter" means and what a function is.
-
Actually, the first parameter of the mysqli_connect() function is the name of the database server. It's often "localhost", but might be something else, for example "sql.webhost.com" I suggest you read the whole PHP tutorial so you can understand the concepts more clearly.
-
The $ indicates a variable, which is explained in the W3Schools PHP tutorial. If you don't want a variable, then you can use a string: $conn = mysqli_connect('shop', 'root', 'password'); What program are you using to edit your code? If it's converting your single-quotes to fancy quotes, then it's clearly not a coding environment you're working in.
-
I need a tutorial for Loading Webpage Data - screen scraping
Ingolme replied to confused and dazed's topic in PHP
You should check the value of $output in the if() statement, rather than calling curl_exec() a second time. What value does $output have? -
It looks like you have an invalid character as your string delimiter, you can see it clearly when the code is highlighted. This is the problem: include('connect.php’); There are other problems, such as the variables names used here: $conn = mysqli_connect($Shop, $root, $password);
-
Please only make one topic for your question. Discussion will be continued in this thread: http://w3schools.invisionzone.com/index.php?showtopic=53012
-
<table> is an HTML thing. You can't write an XML file with a <table> element and expect it to render a table visually because in XML, <table> doesn't have any special meaning, it's just an element named "table".
-
The ceil() function does that: http://php.net/ceil
-
I need a tutorial for Loading Webpage Data - screen scraping
Ingolme replied to confused and dazed's topic in PHP
Some APIs return JSON, others return XML, others might have their own format. But with PHP, you still need cURL to get the data from the API. I suggest you familiarize yourself with the cURL library. If after reading the PHP manual you still have trouble, I could help with a couple of examples.