• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
Guys, i'm confused. This is giving me an error. [code]<?php $_CONFIG = array( "title"=>"Ciache Designs | Bespoke, One of a kind computers", "logo"=>array( 1=>"Ciache", 2=>"Design") "twin1"=>array( "header"=>"Header" ) "twin2"=>array( "header"=>"Header" ) "tab1"=>array( "header"=>"All-powerful", "description"=>"Using the latest and most powerful hardware your computer will be able to hand anything and everything thrown at it."), "tab2"=>array( "header"=>"Cool and Quiet", "description"=>"By using the latest closed water-cooling loops and variable-speed PWM fans your computer can be as quiet and as cool as you want."), "tab3"=>array( "header"=>"Reliable", "description"=>"High-quality parts and lovingly built, your new computer will last for years to come, unlike brands such as Dell or Alienware."), "copyright"=>array( "final"=>"Ciache Design &copy; Simon Poole ".date('Y').".") ); ?>[/code] [quote] Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/pdo/public_html/config.php on line 7[/quote] This part is line 7: [code]"twin1"=>array([/code] NVM Fixed it, missing only a single , -.-
[QUOTE=Ac!dL3ak;31891574]youre not passing any information on to index.php with that .htaccess, all it's doing is redirecting everyone to index.php[/QUOTE] but when you dont look at the actual code and just look at the website it looks like it's on a separate page. You can also config it so it looks like whatever you want it to look like.
Whats the best website to learn javascript?Preferably something like HTMLDog, that was great.
[QUOTE=w0lfeh;31903349]Whats the best website to learn javascript?Preferably something like HTMLDog, that was great.[/QUOTE] try tizag
I am creating a website with a query system which takes the users input (from a textbox) and inserts it into a sql query to search the database to perform a partial search. Is mysql_real_escape_string alone enough to protect against sql injection attacks?
[QUOTE=Sharpshooter;31906634]I am creating a website with a query system which takes the users input (from a textbox) and inserts it into a sql query to search the database to perform a partial search. Is mysql_real_escape_string alone enough to protect against sql injection attacks?[/QUOTE] Use PDO prepared statements instead of the usual PHP MySQL interaction and do htmlspecialchars on the input I think that should do it
pdo is
[QUOTE=TehWhale;31906655]pdo is[/QUOTE]Since I started using PDO, my productivity has gone up 600% and I've gained 4500 monthly users. I now live in a four story solid gold mansion, and I actually found out what happens after death because my database was so secure. I am considered a prophet by 59% of major religion, and I'm safe from SQL injection!
[QUOTE=vepa;31883655] Linode does have some less common features like LISH though (direct tty access to the VPS through either a web console or SSH).[/QUOTE] Most VPS providers provide this, too. It's called a "serial console" and it probably does the same thing. edit: linode does have some other cool features, though
[QUOTE=Octave;31907067]Since I started using PDO, my productivity has gone up 600% and I've gained 4500 monthly users. I now live in a four story solid gold mansion, and I actually found out what happens after death because my database was so secure. I am considered a prophet by 59% of major religion, and I'm safe from SQL injection![/QUOTE] sounds legit
[QUOTE=Octave;31907067]Since I started using PDO, my productivity has gone up 600% and I've gained 4500 monthly users. I now live in a four story solid gold mansion, and I actually found out what happens after death because my database was so secure. I am considered a prophet by 59% of major [B]religion[/B], and I'm safe from SQL injection![/QUOTE] What?
[QUOTE=Alcapwne;31906654]and do htmlspecialchars on the input[/QUOTE] You should only ever escape data [i]immediately[/i] before transmission over another medium. This means only ever escape for HTML as you're outputting the HTML, and only ever escape for SQL as you're sticking it into the query (if you don't use PDO)
Hello , I want to ask if can someone make a reply with all the site from were I chould Learn PHP/HTML , because I need something and I canot find someone who can help me with some small stuff.
[QUOTE=R@Rdeathmatch;31913197]Hello , I want to ask if can someone make a reply with all the site from were I chould Learn PHP/HTML , because I need something and I canot find someone who can help me with some small stuff.[/QUOTE] do it yourself
[QUOTE=moonage;31913265]do it yourself[/QUOTE] Your idiot , I said There that I want to learn because I can't find someone to help me.
[url]www.tizag.com[/url] - Basic PHP/HTML/CSS tutorials [url]www.htmldog.com[/url] - HTML/CSS references
[QUOTE=moonage;31913265]do it yourself[/QUOTE] Shut up. [editline]24th August 2011[/editline] [QUOTE=pdkm931;31913305][url]www.tizag.com[/url] - Basic PHP/HTML/CSS tutorials [url]www.htmldog.com[/url] - HTML/CSS references[/QUOTE] Also [url]http://php.net/[/url] as a reference. If you don't understand a function, go there.
[QUOTE=R@Rdeathmatch;31913276]Your idiot , I said There that I want to learn because I can't find someone to help me.[/QUOTE] my bad, i read your post wrong
[QUOTE=pdkm931;31913305][url]www.tizag.com[/url] - Basic PHP/HTML/CSS tutorials [url]www.htmldog.com[/url] - HTML/CSS references[/QUOTE] Thanks very much. [QUOTE=EJay;31913316]Also [url]http://php.net/[/url] as a reference. If you don't understand a function, go there.[/QUOTE] Thanks vety much. [QUOTE=moonage;31913338]my bad, i read your post wrong[/QUOTE] I know.
Two things: 1) Where is a good place (or the best/cheapest place) to buy a domain name from? Is this going to be a monthly/annual charge? I've already heard about Lithium hosting for web hosting so I think I'm set on that, but I figured it'd be a good idea to see what other options are available as far as domain registration is concerned. 2) What's a good client/program that will let me test out html/css/php templates before actually registering hosting and getting a site all set up? I remember when I had a Mac ages ago when I was first learning coding I had two programs called jEdit and MAMP; jEdit let me create/edit files in any possible language, and MAMP made it so that I could view the pages I was creating in my browser. What would be the best equivalents of these for Windows (preferably free)? Thanks!
gandi
[QUOTE=DSG;31914668]Two things: 1) Where is a good place (or the best/cheapest place) to buy a domain name from? Is this going to be a monthly/annual charge? I've already heard about Lithium hosting for web hosting so I think I'm set on that, but I figured it'd be a good idea to see what other options are available as far as domain registration is concerned. 2) What's a good client/program that will let me test out html/css/php templates before actually registering hosting and getting a site all set up? I remember when I had a Mac ages ago when I was first learning coding I had two programs called jEdit and MAMP; jEdit let me create/edit files in any possible language, and MAMP made it so that I could view the pages I was creating in my browser. What would be the best equivalents of these for Windows (preferably free)? Thanks![/QUOTE] Don't know what best coding tool to suggest you but i heard good things about easy php. It emulates a web server on your pc so you can code without worrying about any hosting.
xampp and sublime text
Or wamp.
php's built in webserver will be useful when it arrives
I finished Rails for Zombies, but the problem is, they only taught you some basics [i]after[/i] it was installed. Is there any tutorial for setting up a rails server on my website?
So I just finished making a very basic login system (using a tutorial), you can see it here [url]http://jamglobe.zymichost.com[/url] username is john password is 1234 Now I've made it I don't really know how to use it, for example I would quite like to hide that login form on the index page if the user is logged in, but I don't really know how to do it. Is there a place I can find tutorials for this sort of thing? I'm not particularly experienced using PHP.
[QUOTE=Gustafa;31918180]So I just finished making a very basic login system (using a tutorial), you can see it here [url]http://jamglobe.zymichost.com[/url] username is john password is 1234 Now I've made it I don't really know how to use it, for example I would quite like to hide that login form on the index page if the user is logged in, but I don't really know how to do it. Is there a place I can find tutorials for this sort of thing? I'm not particularly experienced using PHP.[/QUOTE] Use $_SESSION variables. Follow this, except replace everything with PDO. [url]http://net.tutsplus.com/tutorials/php/user-membership-with-php/[/url]
Can someone tell me why this makes the buttons show up, albeit incorrectly. [code]<!-- INCLUDE ucp_header.html --> <form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}> {$CA_BLOCK_START} {$CA_CAP2_START}{L_BOARDWATCH}{$CA_CAP2_END} <table class="tablebg" width="100%" cellspacing="{$CA_SPACING}"> <!-- IF ERROR --> <tr> <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_BOARDWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_BOARDWATCH}:</b></td> <td class="row2"> <label for="boardwatch0"><input type="radio" name="boardwatch" id="boardwatch0" value="0"<!-- IF S_BOARDWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="boardwatch1"><input type="radio" name="boardwatch" id="boardwatch1" value="1"<!-- IF S_BOARDWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_BOARDWATCH_YES_BUT}</label> <label for="boardwatch2"><input type="radio" name="boardwatch" id="boardwatch2" value="2"<!-- IF S_BOARDWATCH_NO --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_FORUMWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_FORUMWATCH}:</b></td> <td class="row2"> <label for="forumwatch0"><input type="radio" name="forumwatch" id="forumwatch0" value="0"<!-- IF S_FORUMWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="forumwatch1"><input type="radio" name="forumwatch" id="forumwatch1" value="1"<!-- IF S_FORUMWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_FORUMWATCH_YES_BUT}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_TOPICWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_TOPICWATCH}:</b></td> <td class="row2"> <label for="topicwatch0"><input type="radio" name="topicwatch" id="topicwatch0" value="0"<!-- IF S_TOPICWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="topicwatch1"><input type="radio" name="topicwatch" id="topicwatch1" value="1"<!-- IF S_TOPICWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_TOPICWATCH_YES_BUT}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_NO_BOARDWATCH_OPTIONS -->{L_BOARDWATCH_NO_OPTIONS}<!-- ENDIF --> </table> <fieldset class="submit-buttons"> {S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />&nbsp; <input type="submit" name="submit" value="{L_SUBMIT}" class="button1" /> {S_FORM_TOKEN} </fieldset> </form> {$CA_BLOCK_END} <!-- INCLUDE ucp_footer.html -->[/code] Whereas this should, but doesn't make the buttons jive with the theme. [code]<!-- INCLUDE ucp_header.html --> <form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}> {$CA_BLOCK_START} {$CA_CAP2_START}{L_BOARDWATCH}{$CA_CAP2_END} <table class="tablebg" width="100%" cellspacing="{$CA_SPACING}"> <!-- IF ERROR --> <tr> <td class="row3" colspan="2" align="center"><span class="gensmall error">{ERROR}</span></td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_BOARDWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_BOARDWATCH}:</b></td> <td class="row2"> <label for="boardwatch0"><input type="radio" name="boardwatch" id="boardwatch0" value="0"<!-- IF S_BOARDWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="boardwatch1"><input type="radio" name="boardwatch" id="boardwatch1" value="1"<!-- IF S_BOARDWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_BOARDWATCH_YES_BUT}</label> <label for="boardwatch2"><input type="radio" name="boardwatch" id="boardwatch2" value="2"<!-- IF S_BOARDWATCH_NO --> checked="checked"<!-- ENDIF --> /> {L_NO}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_FORUMWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_FORUMWATCH}:</b></td> <td class="row2"> <label for="forumwatch0"><input type="radio" name="forumwatch" id="forumwatch0" value="0"<!-- IF S_FORUMWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="forumwatch1"><input type="radio" name="forumwatch" id="forumwatch1" value="1"<!-- IF S_FORUMWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_FORUMWATCH_YES_BUT}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_VIEW_TOPICWATCH_OPTIONS --> <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARDWATCH_TOPICWATCH}:</b></td> <td class="row2"> <label for="topicwatch0"><input type="radio" name="topicwatch" id="topicwatch0" value="0"<!-- IF S_TOPICWATCH_YES --> checked="checked"<!-- ENDIF --> /> {L_YES}</label> <label for="topicwatch1"><input type="radio" name="topicwatch" id="topicwatch1" value="1"<!-- IF S_TOPICWATCH_YES_BUT --> checked="checked"<!-- ENDIF --> /> {L_TOPICWATCH_YES_BUT}</label> </td> </tr> <!-- ENDIF --> <!-- IF S_NO_BOARDWATCH_OPTIONS -->{L_BOARDWATCH_NO_OPTIONS}<!-- ENDIF --> </table> <tr> <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="submit" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" name="reset" /></td> </tr> </form> {$CA_BLOCK_END} <!-- INCLUDE ucp_footer.html -->[/code] [editline]24th August 2011[/editline] Oh jesus why doesn't the code have a scrolling bar or something?
Hi guys, I'm from the Programming subforum, and what I'm basically looking for is: What's a good way to get started with HTML5 and Javascript? I know the OO model Javascript uses, and I just want to jump right in, mind helping me?
Sorry, you need to Log In to post a reply to this thread.