• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
namecheap.com if you're looking for a nice cheap domain provider
[QUOTE=Lequinx;32315074]namecheap.com if you're looking for a nice cheap domain provider[/QUOTE] I just bought my domain from them a few weeks ago, and I have to agree. They're pretty awesome. Haven't had a single issue other than them thinking I stole the paypal account I used to pay, when it was just my friend paying. After I explained it to them, they understood it completely, and everything has been pretty much perfect since then.
Whats the best server-side language? In terms of stableness and speed. I mean I know C++ is one of the fastest languages so I would have thought facebooks HipHop would be good but I wasnt sure what languages are like in a server environment (having only really programmed for desktops)
Hi! I'm new in the HTML5 and css' world. Today I started to make some experiences with the language. But the main's background is ashamed and it don't wanna be visible to my eyes. I can't understand why. Any help? this is the code: [code] <!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="foglio.css"> <script src="ProvaPhp.js"></script> <title>Prova HTML5</title> </head> <body> <section id="main"> <header id="logo"> </header> </section> </body> </html> [/code] (css): [code] body { padding: 0px; } #main { background-image: url('./backgr.jpg'); border: red; max-height: 2000px; max-width: 2000px; } [/code]
Don't be hard-judging on him, he's new to the realms of the Internet. And the realms of English as well.
[QUOTE=Richy19;32318602]Whats the best server-side language? In terms of stableness and speed. I mean I know C++ is one of the fastest languages so I would have thought facebooks HipHop would be good but I wasnt sure what languages are like in a server environment (having only really programmed for desktops)[/QUOTE] PHP is the old giant in webdev, that is kinda like a lingua-franca, but it's dodgy as fuck in places. [i]Modern[/i] web startups tend to be using either (language/framework) Ruby/Rails Python/Django or Javascript/Node.js, for simpler projects there's also Ruby/Sinatra and Python/Bottle
[QUOTE=Richy19;32318602]Whats the best server-side language? In terms of stableness and speed. I mean I know C++ is one of the fastest languages so I would have thought facebooks HipHop would be good but I wasnt sure what languages are like in a server environment (having only really programmed for desktops)[/QUOTE] HipHop is PHP compiled.
[QUOTE=sentrix;32324310]HipHop is PHP compiled.[/QUOTE] Not really, it translates PHP to optimized C++ and then compiles that.
[QUOTE=hardrock06;32319769]Hi! I'm new in the HTML5 and css' world. Today I started to make some experiences with the language. But the main's background is ashamed and it don't wanna be visible to my eyes. I can't understand why. Any help? this is the code: [code] <!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="foglio.css"> <script src="ProvaPhp.js"></script> <title>Prova HTML5</title> </head> <body> <section id="main"> <header id="logo"> </header> </section> </body> </html> [/code] (css): [code] body { padding: 0px; } #main { background-image: url('./backgr.jpg'); border: red; max-height: 2000px; max-width: 2000px; } [/code][/QUOTE] Are sections the div's of html5 or something? Or did I miss something?
[QUOTE=mobrockers2;32325900]Are sections the div's of html5 or something? Or did I miss something?[/QUOTE] ya you did. [url]http://www.quackit.com/html_5/tags/html_section_tag.cfm[/url]
[QUOTE=zzlawlzz;32325976]ya you did. [url]http://www.quackit.com/html_5/tags/html_section_tag.cfm[/url][/QUOTE] I should have asked if section tags were introduced in html5 because that's what I wanted to know. I have no idea why I asked if they were div's :v:
[QUOTE=mobrockers2;32325900]Are sections the div's of html5 or something? Or did I miss something?[/QUOTE] snip, late.
[url]http://pastebin.com/fpwYg0qf[/url] It's smarty template system, by the way. [url]http://oct.vc/forum/[/url] Why are the subforum links (programming, programming2) showing up at the top?
[QUOTE=Octave;32327759][url]http://pastebin.com/fpwYg0qf[/url] It's smarty template system, by the way. [url]http://oct.vc/forum/[/url] Why are the subforum links (programming, programming2) showing up at the top?[/QUOTE] -can't read-
[QUOTE=mobrockers2;32328147]-can't read-[/QUOTE]What do you mean? The indentation on the template source?
I'm used to buying a domain from whatever my provider currently is, (1and1, dreamhost) But I don't have, nor need a hosting provider at the moment and would like to purchase a domain. How would I go about setting up subdomains? I'd like to use tumblr for hosting the main page, seeing as the main page is almost completely useless.
[QUOTE=Octave;32328162]What do you mean? The indentation on the template source?[/QUOTE] I snipped it with -can't read- because it was a stupid post.
[QUOTE=mobrockers2;32328186]I snipped it with -can't read- because it was a stupid post.[/QUOTE]Oh okay :v:
[QUOTE=Octave;32328221]Oh okay :v:[/QUOTE] Tbh I don't even recognize the language you're using. I've never seen { used that way :C I have so much to learn :C
[QUOTE=mobrockers2;32328260]Tbh I don't even recognize the language you're using. I've never seen { used that way :C I have so much to learn :C[/QUOTE][url]http://www.smarty.net/docs/en/[/url] It's not an actual language really, it's a template system. It separates the backend PHP from the frontend HTML. You pass variables from PHP to the template and the template just puts them in place.
[QUOTE=StinkyJoe;32324460]Not really, it translates PHP to optimized C++ and then compiles that.[/QUOTE] Oh. [editline]16th September 2011[/editline] But I highly doubt you're going to be able to write the C++ needed to work with HipHop, I'm assuming the generated code is not pleasant to work with.
[QUOTE=Octave;32327759][url]http://pastebin.com/fpwYg0qf[/url] It's smarty template system, by the way. [url]http://oct.vc/forum/[/url] Why are the subforum links (programming, programming2) showing up at the top?[/QUOTE]Nevermind, solved this.
Deciding to take on css since I want to make front-ends to the websites I want to make. However, in the process, I have a little problem: [IMG]http://gyazo.com/dbf03e1a0ce5f2e9594ac4051a581d78.png[/IMG] The container div is not expanding when the content div expands. I don't know why. html: [html] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="style/style.css" rel="stylesheet" type="text/css" /> <title></title> </head> <body> <div class="container"> <div class="header"> header </div> <div class="navigation"> One Two Three </div> <div class="sidebar"> item1<br /> item2<br /> item3 </div> <div class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. </div> </div> </body> </html> [/html] [css] body{ font-family: Arial, sans-serif; font-size: 10pt; background-color: #f2f2f2; } div.container{ width: 600px; margin-right: auto; margin-left: auto; border: 2px solid #ddd; background-color: white; } div.header{ font-size: 18pt; padding: 10px; border-bottom: 1px solid #ddd; } div.navigation{ padding: 2px 5px 2px 5px; border-bottom: 1px solid #ddd } div.sidebar{ width: 150px; padding: 5px; border-right: 2px solid #ddd; } div.content{ float: right; width: 450px; padding: 5px; } [/css] This is what I'm trying to get to, roughly: [IMG]http://i.imgur.com/4VVSH.png[/IMG]
It's because you're floating the content div.
[QUOTE=Lequinx;32330916]Deciding to take on css since I want to make front-ends to the websites I want to make. However, in the process, I have a little problem: [IMG]http://gyazo.com/dbf03e1a0ce5f2e9594ac4051a581d78.png[/IMG] The container div is not expanding when the content div expands. I don't know why. html: [html] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="style/style.css" rel="stylesheet" type="text/css" /> <title></title> </head> <body> <div class="container"> <div class="header"> header </div> <div class="navigation"> One Two Three </div> <div class="sidebar"> item1<br /> item2<br /> item3 </div> <div class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. </div> </div> </body> </html> [/html] [css] body{ font-family: Arial, sans-serif; font-size: 10pt; background-color: #f2f2f2; } div.container{ width: 600px; margin-right: auto; margin-left: auto; border: 2px solid #ddd; background-color: white; } div.header{ font-size: 18pt; padding: 10px; border-bottom: 1px solid #ddd; } div.navigation{ padding: 2px 5px 2px 5px; border-bottom: 1px solid #ddd } div.sidebar{ width: 150px; padding: 5px; border-right: 2px solid #ddd; } div.content{ float: right; width: 450px; padding: 5px; } [/css] This is what I'm trying to get to, roughly: [IMG]http://i.imgur.com/4VVSH.png[/IMG][/QUOTE] Add an element with the "clear:both" style at the end inside the .container div. <div class="container"> CONTENT <br style="clear:both" /> </div>
Or you could just set the sidebar and content area to be inline-block and then you wouldn't have to mess around with floats.
Hello there. I'm trying to make myself a simple website, but I got stuck. How can I make my table background transparent? [img]http://dl.dropbox.com/u/20945920/htmlhelp.png[/img] [code]<style>#web-buttons-idsiooi a{display:block;color:transparent;} #web-buttons-idsiooi a:hover{background-position:left bottom;}a#web-buttons-idsiooia {display:none}</style> <table width=0 border="0" cellpadding=0 cellspacing=0 id="web-buttons-idsiooi" ><tr> <td style="padding-right:0px" title ="Home"> <a href="#" title="Home" style="background-image:url(buttons-files/btsiooi.png);width:108px;height:34px;display:block;"><br/></a></td> <td style="padding-right:0px" title ="Android"> <a href="#" title="Android" style="background-image:url(buttons-files/bt3iooi.png);width:108px;height:34px;display:block;"><br/></a></td> <td style="padding-right:0px" title ="Java"> <a href="#" title="Java" style="background-image:url(buttons-files/btriooi.png);width:92px;height:34px;display:block;"><br/></a></td> <td style="padding-right:0px" title ="C#"> <a href="#" title="C#" style="background-image:url(buttons-files/bt6iooi.png);width:84px;height:34px;display:block;"><br/></a></td> </tr></table>[/code] [editline]17th September 2011[/editline] Fixed it! :downs:
I picked up PHP and MySQL web development a few weeks ago, and have been reading through it, I tried to use it to make a login system and couldn't get it to work, so got the files that came with the CD and even they don't work, I get this error: [img]http://puu.sh/5JEe[/img] [php] <?php session_start(); if (isset($_POST['userid']) && isset($_POST['password'])) { // if the user has just tried to log in $userid = $_POST['userid']; $password = $_POST['password']; $db_conn = new mysqli('localhost', 'root', 'removedpassword', 'auth'); if (mysqli_connect_errno()) { echo 'Connection to database failed:'.mysqli_connect_error(); exit(); } $query = 'select * from authorised_users ' ."where name='$userid' " ." and password=sha1('$password')"; $result = $db_conn->query($query); if ($result->num_rows >0 ) { // if they are in the database register the user id $_SESSION['valid_user'] = $userid; } $db_conn->close(); } ?> <html> <body> <h1>Home page</h1> <? if (isset($_SESSION['valid_user'])) { echo 'You are logged in as: '.$_SESSION['valid_user'].' <br />'; echo '<a href="logout.php">Log out</a><br />'; } else { if (isset($userid)) { // if they've tried and failed to log in echo 'Could not log you in.<br />'; } else { // they have not tried to log in yet or have logged out echo 'You are not logged in.<br />'; } // provide form to log in echo '<form method="post" action="authmain.php">'; echo '<table>'; echo '<tr><td>Userid:</td>'; echo '<td><input type="text" name="userid"></td></tr>'; echo '<tr><td>Password:</td>'; echo '<td><input type="password" name="password"></td></tr>'; echo '<tr><td colspan="2" align="center">'; echo '<input type="submit" value="Log in"></td></tr>'; echo '</table></form>'; } ?> <br /> <a href="members_only.php">Members section</a> </body> </html> [/php] The login information is all right, I've been googling for hours and just cannot find a solution, does anyone have any idea whats going wrong? All the files are copy pasted from the CD and so is the database setup, what on earth is wrong? The book is the newest version so it shouldn't be outdated code
I have a web site, and the objective of the website is to click a button. How would I make it upload the score to a MySQL database? Should I use sessions and subtract the new score by the old score?
[QUOTE=Adzter;32334937]I picked up PHP and MySQL web development a few weeks ago, and have been reading through it, I tried to use it to make a login system and couldn't get it to work, so got the files that came with the CD and even they don't work, I get this error: [img]http://puu.sh/5JEe[/img] The login information is all right, I've been googling for hours and just cannot find a solution, does anyone have any idea whats going wrong? All the files are copy pasted from the CD and so is the database setup, what on earth is wrong? The book is the newest version so it shouldn't be outdated code[/QUOTE] You need to learn to read errors properly, and pairing that with the php manual. Let's go through this step by step: "Trying to get property of non-object (...) on line 22" - if you look at line 22: [code] if ($result->num_rows >0 ) [/code] You are trying to access a property of $result, [b]assuming[/b] it is an object. If we look at where that variable is set... [code] $result = $db_conn->query($query); [/code] ...you can see it's a result of $db_conn->query...$db_conn itself is an instance of the [b]mysqli[/b] class, so what we need to know is - [b]what does mysqli::query return?[/b] [url]http://php.net/manual/en/mysqli.query.php#refsect1-mysqli.query-returnvalues[/url] [quote]Returns [B]FALSE on failure[/B]. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() will return a MySQLi_Result object. [B]For other successful queries mysqli_query() will return TRUE[/B]. [/quote] That's atleast two possible cases where $result isn't actually a instance (in this case, of MySQLi_Result). Since this is a SELECT statement, just as you can see in the return values section, $result is most likely FALSE, which means there was an error when attempting to complete your command. To figure out just what happened, use the mysqli::error method, as described in: [url]http://www.php.net/manual/en/mysqli.error.php[/url]
Sorry, you need to Log In to post a reply to this thread.