Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

matchstick

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    matchstick reacted to web-itec in PHP devs stop doing things bad!   
    You still dont quite get it do you..
     
    The time you spend writing the php as OO would take you 15times longer than to just write it out quick, lets take echoing something simply for example, or the worlds simplest form or maybe a small program your going to use once (aka custom like you said), then for each time you apply the OOP to the next php script for it to actually work that would take the equivelant time as it would to just write the code out anyway, so practically you are spending 5times longer coding than it would to do it without the OO,
     
    Also, if its CUSTOM then it would in theory defeat the OOP as OOP is for reusable code, if the code was reused then it wouldnt be custom would it....
     
    In terms of the ROR, PY & .NET, as far as i know they basically use precompiled librarys where the designers use them instead of writing out all the script, thats because someone made them librarys for EVERYONE to use on ROR etc, not just for everyone scripting with ROR for example to write there own librarys
     
    And you didnt specify you wasnt talking about small scripts, you was saying everything should be OOP, but if you insist on using OO for everything then go ahead and waste your time
  2. Like
    Hmm, there could be a few ways to do this, but yet again you said your using dreamweaver so i dont know
     
    but as far as i know, you could work out what position the cursor is at and then make an object appear using absolute position or something and set its position to what the cursors is, and then obviously have the image inside that and have the image change colour or whatever you want, unless you have fixed areas at which are "hotspots" when the mouse is over them, just simply change the colour of the square or whatever
  3. Like
    matchstick reacted to web-itec in php question - easy plus 1!   
    $ud_id=mysql_real_escape_string($_POST['ud_id']);
    $ud_first=mysql_real_escape_string($_POST['ud_first']);
    $ud_last=mysql_real_escape_string($_POST['ud_last']);
    $ud_mobile=mysql_real_escape_string($_POST['ud_mobile']);
    $ud_email=mysql_real_escape_string($_POST['ud_email']);
     
    like that on all variables like $_POST $_REQUEST and $_GET
     
    it basically escapes the inputted variable before you put it into a mysql query to avoid injection, for example, to hack a login form, the simplest injection would look something like ' OR 1=1 and by using the mysql_real_escape_string(), it would avoid that causing any harm to your mysql query
     
    you dont need to go into detail what exactly it does to it and how it stops it, all you need to know is that it does stop injection (well avoid it)
  4. Like
    matchstick reacted to web-itec in variable in sql command?   
    decided ill try using session to create a sort of global variable and done that and set the category as a session and then called it in later to the sql query and it worked woo
     
    Thanks peoples much appreciated, rep to those who helped
  5. Like
    matchstick reacted to web-itec in What do you think of Web based IDE?   
    completed, i guess someones thinking of designing a new IDE..
  6. Like
    matchstick reacted to web-itec in Search within multidimensional array   
    for the fun of it and some time i have to waste, i just calculated how long it takes the page to load if i set something in an array 100000 times and then if i echoed what was in that array 100000 times
     
    the page took 0.0001 seconds to load with nothing on the script
    it taken 0.5000s - 0.6000s to load the page with a for loop adding stuff into an array 100000 times and then another for loop echoing them all
     
    so that goes to show how not much it doesnt slow the page down thats half a second difference for 100000 aswel not 100
     

    <?php $time_start = microtime(true); $numberofitemsinarray = 100000; $ourarray = array(); for($i=0; $i<=$numberofitemsinarray; $i++) { $ourarray[$i] = $i; } for($i=0; $i<=$numberofitemsinarray; $i++) { echo $ourarray[$i]; } $time_end = microtime(true); $time = $time_end - $time_start; echo "<br>" . round($time,4) . " s"; ?>
     
    ^^ my pointless code lol
  7. Like
    matchstick reacted to web-itec in php validation   
    function ValidateEmail($email) { $valid = true; $findats = strrpos($email, "@"); if (is_bool($findats) && !$findats) { $valid = false; } else { $domain = substr($email, $findats+1); $local = substr($email, 0, $findats); $locallength = strlen($local); $domainlength = strlen($domain); if ($locallength < 1 || $locallength > 64) { $valid = false; } elseif ($domainlength < 1 || $domainlength > 256) { $valid = false; } elseif ($local[0] == '.' || $local[$locallength-1] == '.') { $valid = false; } elseif ((preg_match('/\\.\\./', $local)) || (preg_match('/\\.\\./', $domain))) { $valid = false; } elseif (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) { $valid = false; } elseif (!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/', str_replace("\\\\","",$local))) { if (!preg_match('/^"(\\\\"|[^"])+"$/', str_replace("\\\\","",$local))) { $valid = false; } } elseif (!(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))) { $valid = false; } } if ($valid) { echo $email.' is valid!'; } else { echo $email.' is not valid!'; } }
     
    ^^ the best validator ive ever came across, checks for certain characters, checks domain exists, checks theres no dots at start or finish of email an checks some other little bits
  8. Like
    matchstick reacted to web-itec in [PHP] Welcome email on new registration...   
    function enc($str) { $enc = base64_encode("@".base64_encode("Y6".base64_encode($str))); return $enc; } function dec($str) { $dec = base64_decode(substr(base64_decode(substr(base64_decode($str),1)),2)); return $dec; }
     
    thought my encode and decode would come handy too, so people cant simply encode anything and put it in the url pretending theyve validated the email
  9. Like
    matchstick reacted to web-itec in php includes   
    My bad, need to use the && not ||
  10. Like
    matchstick reacted to web-itec in IE Problems   
  11. Like
    matchstick reacted to Alluziion in Advice Needed   
    ...
     
     
    ...
     
    Imo, social networks tend to either fail horribly or succeed greatly. With the major success of Facebook, MySpace, Twitter etc. the competition is rising greatly - always trying to push the limits and boundaries of what their users can do in order to increase the experience.
     
    As far as I'm aware, the development of a social networking website is fairly straightforward with a great deal of server-side development. Your going to need both Front-end and Back-end developers. The budget depends on how well of a job you want and how fast you want to get the job finished. But additionally, running a large-scale site is expensive and demanding on servers; your major investments should be server space and offices for your employees.
     
    Anyhow, some may disagree with me, I'm not a CEO nor own my own business so i'll leave my advice there until a expert comes along.
     
    Anyway, I wish you good luck with your project!
  12. Like
    matchstick reacted to web-itec in Advice Needed   
    Hello, Welcome to the forum
     
    First of all, when youve got a new idea in your head of a project you should really note down everything that comes to mind
     
    a good place to start is what you intend to do, are you only a designer or a developer or both? if your only a designer your obviously going to need a developer, vice versa, you need to take all costs into concideration, advertising costs and developers/designers cost, we can be talking £2000-£5000 in them costs for the average site like this to be set up in terms of designing and developing
     
    You need to think how you are going to get people to your site, we need to be talking realistic figures and targets otherwise you wont get anywhere unless youve got a huge budjet for advertising, by emailing people telling them you have a new social network site whats the chance they read the message? (expecially if it ends up in their junk mail box) not too a high chance for the typical teenager to read their emails, then you need to concider the likely hood of them going to the site even if they do read the message, then you need to take into account whether they will continue to use the site or sign up,
     
    You could advertise through friends which is practically free, emailing, advertising on other websites (pretty costly) or even leaflets of some sort, you need to make your site special, as there are loads of social network sites already existing and most people actually being on a social networking site already, the market is pretty tough which is why you need to take pretty much every little detail into concideration
     
    Then the law side of things, Your going to at minimum need a privacy policy and terms & conditions to save your a*se whether the problems being big or small, you need to make sure you cover stuff like your liability of peoples loss because of the use of your site, whether they be because your site has been hacked and there details have been taken/released, or whether someone has physically caused harm to a user which was inflicted from the use of the site, you need to state the age users must be and if theyre not you make sure you remove them however you prefer and also so that users agree to not discriminate, be racist, intimidate and so on so forth
     
    detail should be taken on your policies so that if the slightest thing arises then your not to blaim, you MUST follow the data protection act which as it says is about protecting data suitably the main points being, 1) you must protect the user(s) data (expecially senstive data) suitably and securly, in other words so that its not easy for someone to simply get hold of the data and 2) you must not collect unecessary data such as bank details when you dont need them and so on
     
    http://www.ico.gov.uk/for_organisations/data_protection.aspx
    has all the details you need to know about the data protection act
     
    Goodluck, Gary
  13. Like
    matchstick reacted to webdeveloper93 in output   
    Why have an attitude? hes just telling u what he did, ur code was quite a mess to start with and he straightened it up.. so if your gonna get attitudes with actual pros i suggest u just bug off somewhere else, enough said
  14. Like
    matchstick reacted to web-itec in output   
    dude was only tryna help, and i wouldnt call myself a pro
     
    although now you mention it, thanks
  15. Like
    matchstick reacted to RyanSMcFadyen in Problem with contact page...   
    hMailServer is a free SMTP server you can use.
     
    Not having a mail server may not be the issue though. Some ISP's just flat block all outbound traffic on Port 25 in an effort to reduce hijacked home systems from sending out spam.
  16. Like
    matchstick reacted to web-itec in Problem with contact page...   
    most likely to be your server doesnt support the mail function then or you have incorrectly written it
  17. Like
    matchstick reacted to web-itec in JAVASCRIPT to PHP possible?   
    yes, you cant alter the actual script youve already ran as it is "PRE"processed, but you can actually run another PHP file in the background using javascript to recall data from another file such as live feeds but you must update the visible data using javascript again as its impossible for the PHP to do that part
     
    so in answer to your question raswell, you can either preset the session and then call the javascript using the php variable to pass into the javascript, or you can load a separate php file that has what you need to do AFTER the main php file has ran
     
     
     
    Way 1 -

    <script type="text/javascript"> function txtjs(print){ document.write(print); } </script> <?php $printvar = THE SESSION GOES HERE; //must already be set <a onclick=\"txtjs('$printvar')\">Do JS and call the variable into the JS</a> ?>
     
    Not tested but should work,
     
    Way 2-

    <script type="text/javascript"> function Show() { var xmlhttp; if(window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { var unread = (xmlhttp.responseText); document.getElementById("thefieldyourupdatingto").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","yourphpfile.php",true); xmlhttp.send(); } </script>
     
    above is the javascript, not to forget you need to execute it(how it is now, its only a function)
     
    Below is the php, ive named it yourphpfile.php (a different php file the original)

    <?php echo "what you want to print, just change this so that it is setting a variable and echoing it, Javascript wont read the actual variable if you try and pass one through"; ?>
     
    and where youll echo that actual code using a span on the same file you had the javascript on

    <span id="thefieldyourupdatingto"></span>
     
    so basically all the echoed stuff in the php file (yourphpfile.php) will be placed inside the span tags
     
    Like i said before non of it has been tested, so if it doesnt work then work it out yourself, itll only be a minor error
     
    Hope it helps as you didnt explain very well in your initial post
  18. Like
    matchstick reacted to web-itec in My first website   
    if you got a template, then you didnt "make" the site, you just changed some information, so why would you want feedback like davve said, also your hoster/page is listed untrusted and unreliable when i view it
     
    and for feedback to the template, not the site you so called made, it sucks, i think thats the kind of site i made when i was in secondary school in IT, get a new design or get a designer like myself to make a proper site
     
    also, if your planning on hosting videos on that server then goodluck,
     
    you know the average 1minute video is approximatly 80mb in size,
    the site is pretty pointless if it has like 10 videos on it, so for example you have 1000 videos minimum thats 3minutes long,
     
    thats 80mb * 3 = 240mb/video * 1000 = 240000mb on videos (240GB),
    plus images youll have on the site, plus everything else, plus to view videos itll use a fair bit of usage, that wont be cheap either
     
    i dont think an untrusted server is the place to start on something like this, a server to hold what you require for this website isnt going to be cheap, have you taken any of that into concideration yet?
     
    just to give you the heads up before you go wasting your time
  19. Like
    matchstick reacted to web-itec in First Serious Website   
    First of all welcome to the forum
     
    The website looks okay, only thing is really is padding, theres certain text that is too close to the objects starting point, eg "Buscar Producto" is at the start of the search box instead of bit of padding at the start of the search box, the "Colaboradores" dialogue box needs a tiny bit of padding
     
    another thing, on the left handside it looks like a 4/5mm black border (the background) is going up to the top and suddenly stops about 60px from the top, im viewing in firefox if this is just a browser compatibility problem
     
    so basically, just get everything a bit more in the right place and that, other than that it looks pretty good as first attempt
     
    also, just had a quick look at your source and the coding looks pretty tidy aswel, maybe put some html comments in as there easier to spot whilst running down the code, expecially if all the code is loaded from one big php file
     
    Gary
  20. Like
    matchstick reacted to web-itec in First Serious Website   
    sorted now on my screen mate looks sweet, keep it going and not forget to mention that a tiny bit more of padding to close it in a little more would be good
  21. Like
    dont have a clue unless you post the code what its like when its working and what the codes like when its not working
     
    Gary
  22. Like
    matchstick reacted to web-itec in Slow loading?   
    Its likely to be your server, it didnt take that long on my internet,
     
    is all of the below all really that necessary? because it doesnt really help having that much going on lol i have about 7 lines in my head tags
     

    <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="stylesheet" type="text/css" media="all" href="http://ashleymosuro.com/wp-content/themes/ashleymosuro/style.css" /> <link rel="pingback" href="http://ashleymosuro.com/xmlrpc.php" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17474763-3']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <link rel="alternate" type="application/rss+xml" title="Ashley Mosuro | Cambridge Web Designer » Feed" href="http://ashleymosuro.com/feed/" /> <link rel="alternate" type="application/rss+xml" title="Ashley Mosuro | Cambridge Web Designer » Comments Feed" href="http://ashleymosuro.com/comments/feed/" /> <link rel="alternate" type="application/rss+xml" title="Ashley Mosuro | Cambridge Web Designer » Homepage Comments Feed" href="http://ashleymosuro.com/homepage/feed/" /> <link rel="stylesheet" href="http://ashleymosuro.com/wp-content/plugins/fancybox-for-wordpress/css/fancybox.css" type="text/css" media="screen" /> <style type="text/css"> div#fancy_inner {border-color:#BBBBBB} div#fancy_close {right:-15px;top:-12px} div#fancy_bg {background-color:#FFFFFF} </style> <link rel='stylesheet' id='jqueryUiStyle-css' href='http://ashleymosuro.com/wp-content/themes/ashleymosuro/css/jquery-ui.css?ver=3.1.4' type='text/css' media='all' /> <link rel='stylesheet' id='contact-form-7-css' href='http://ashleymosuro.com/wp-content/plugins/contact-form-7/styles.css?ver=2.4.5' type='text/css' media='all' /> <script type='text/javascript' src='http://ashleymosuro.com/wp-includes/js/l10n.js?ver=20101110'></script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js?ver=3.1.4'></script> <script type='text/javascript' src='http://ashleymosuro.com/wp-includes/js/comment-reply.js?ver=20090102'></script> <script type='text/javascript' src='http://ashleymosuro.com/wp-content/plugins/fancybox-for-wordpress/js/jquery.fancybox-1.2.6.min.js?ver=1.3.2'></script> <script type='text/javascript' src='http://ashleymosuro.com/wp-content/plugins/fancybox-for-wordpress/js/jquery.easing.1.3.min.js?ver=1.3.2'></script> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://ashleymosuro.com/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://ashleymosuro.com/wp-includes/wlwmanifest.xml" /> <link rel='index' title='Ashley Mosuro | Cambridge Web Designer' href='http://ashleymosuro.com/' /> <link rel='next' title='About' href='http://ashleymosuro.com/about/' /> <meta name="generator" content="WordPress 3.1.4" /> <link rel='canonical' href='http://ashleymosuro.com/' />
  23. Like
    matchstick reacted to web-itec in sanitisation   
    Hello, okay i know i posted a topic a while ago about mysql_escape_string() but i would like to know if a self made function would work equally as good,
     
    heres what ive got
     

    function cleanstr($junk) { $cleaned1 = preg_replace("/[^A-Za-z0-9\s\s+\.\,\@\_\-\/+\!\;\£\&\$\n\t\r]/","", $junk); $cleaned2 = preg_replace("/[\£]/","£", $cleaned1); return $cleaned2; }
     
    that removes every single symbol exept
    A-Z a-z 0-9 ! £ $ & @ _ + - ; /
    so if i used that function on user inputs from text fields such as a name field like
     

    $name = cleanstr($_POST['name']);
     
    would that then be safe from sql injections as it pretty much rules out every chance possible to have been injected (in theory)?
     
    Thanks, Gary
  24. Like
    matchstick reacted to web-itec in Register as self employed.   
    an accountant CAN save you money, but only really once your companys earning over X ammount and you have more than just basic things running in the company (aka just simple expenses and incomes (no fixed assets as such)), other than that you may aswel do it yourself, all an account will save is £300 from tax or something stupid, itll cost you £500 for the accountant to do your SATR alone, never mind the rest of your paperwork,
     
    Best way is to give each of your invoices a unique number (numerical order would seem obvious) and then in a microsoft spreadsheet, mark each income to the business and each expense (marking down receipt numbers along with it and invoice numbers), will keep it simple and you wont get confused when it comes down to completing tax return
  25. Like
    matchstick reacted to web-itec in Web Design Advice Needed   
    Welcome to the forum, the most likely way for you to get employed in the web design industry is to get the highest qualifications in web design and related studies and build your own portfolio, but obviously thats a real real real long time, in my opinion "the best way" to get employed is to get to a good standard of what areas of web design you wish to do and build your portfolio by doing work for people (being paid or not), when youve got a good portfolio contact web designing companies asking if they are interested in you basically
     
    To be honest with you im not the best person to answer these kind of questions on here so id wait for further advice but thats my opinion on the situation
     
    Gary

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.