Anth Winter
Members
-
Joined
-
Last visited
Reputation Activity
-
Anth Winter got a reaction from JLS in Georgia & Times New Roman CSS Font IssuesHi JLS and welcome. Could you post links to each page/button on the site so that I could check the code that is being given to the buttons
-
Anth Winter reacted to gadgetgirl in fputcsv with MySQL help neededYou might want to check that your query is working,
while ($row = mysqli_fetch_row($r)) { print_r($row); array_push($list, $row); }
-
Anth Winter reacted to gadgetgirl in fputcsv with MySQL help neededYou can use array_push to put the query results into your array. Something like
$r = mysqli_query($connection, "SELECT * FROM my_table"); $list = array (); $eof = array('end', 'end', 'end'); while ($row = mysqli_fetch_row($r)) { array_push($list, $row); } array_push($list, $eof); $fp = fopen('file.csv', 'w'); foreach ($list as $fields) { fputcsv($fp, $fields); } fclose($fp);
I've used the mysqli extension which has superceded mysql. You'll need to be using PHP version 5 and MySql version 4 (I think) to use the newer mysqli extension.
-
Anth Winter reacted to webdeveloper93 in Food Order Form Helpjust for reference to save code u could do this for the amount of people using a for loop
<select name="guests" id="guests"> <?php for($i = 1; $i<= 5; $i++){ echo "<option value='$i'>$i</option>"; } ?> </select>
-
Anth Winter reacted to gadgetgirl in Food Order Form Helpwhy dont you just use another loop?
if(isset($_POST["submitorder"])) { $guests = $_POST['guests']; $sendto = $_POST['sendto']; $fullname = htmlentities($_POST['fullname']); $bookdate = htmlentities($_POST['bookdate']); $phonenum = htmlentities($_POST['phonenum']); $emailaddr = htmlentities($_POST['emailaddr']); $content = "Booking Form for {$guests} People.\n Name of Person Booking:\t{$fullname} Date of Booking:\t{$bookdate} Telephone Number:\t{$phonenum} Email Address:\t{$emailaddr}\n "; for ($i = 1; $i <= $guests; $i++){ if (isset($_POST['person'$i])) { $content .= htmlentities($_POST['person'$i]); $content .= htmlentities($_POST['starter'$i]); $content .= htmlentities($_POST['maincourse'$i]); $content .= htmlentities($_POST['dietary'$i]); }
sorry - got the concatenator operator wrong, learning javascript at the moment
-
Anth Winter reacted to Renaissance-Design in Understanding eCommerce product pages. HTML pages with dynamic content?Copying their descriptions would be a bad idea, as that's duplicate content and theirs has been there longer and is the authoritative version. You need to hire a copywriter and come up with your own.
As to the URLs, you can either pattern match in a rewrite rule or rewrite all pages to index.php and use a front controller.
Apache can be instructed to serve any extension (.php, .phtml, .html) as PHP, all it takes is one line in .htaccess to tell it which types of file to feed through the PHP parser.
-
Anth Winter got a reaction from DigitalSquid in Tricky footer designHi,
heres a quick take on what you are wanting... posistioning is not ideal but hopefully you can get the idea of how to do it by this and posistion it how you want it.
Link: http://www.digitalwinter.co.uk/test/Untitled-1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css.css" /> <title>Untitled Document</title> </head> <body> <div id="above"> </div> <div id="footer"> <div id="footer_left"> <p>Copyright</p> </div> <div id="redcircle"> <img src="circle.png" /> </div> <div id="footer_right"> <p>Design By</p> </div> </div> </body> </html>
* {margin:0; padding:0;} body {color:#fff} #above {width:100%; height:400px; background:#333;} #footer {width:100%; height:30px; margin:0 auto; background:#000;} #footer_left {width:200px; float:left; text-align:right;} #redcircle {width:50px; float:left; position:relative; bottom:25px;} #footer_right {width:200px; float:left;}
-
Anth Winter got a reaction from nibb in Wine site, new look!The design is very good, certainly feels and looks like a wine site.
One tiny critique I would have is that the navigation doesnt feel part of the site, its all the way up top and out the way.
When I landed on your page my focus point is ur title area with the pictures, so immediatly I was looking down at the content from there.
Good job otherwise
-
Anth Winter got a reaction from stjohn in Wine site, new look!I checked out your background, I stretched my IE8 browser across two 17" screens and it kept in proportion and still looked fine blending wise think you may have that one sorted.
-
Anth Winter reacted to Wickham in HTML5 / CSS QuestionIf you use any of the new HTML5 elements, like <header>, <aside>, <video> or <canvas> remember that some browsers (like IE) won't process styles for the new elements until updated. In the case of IE you need to use the javascript conditional comment below (but the styles won't be processed if viewers have javascript/ActiveX disabled and your page layout and styling will not be displayed properly).
IE won't process styles for new tags like <header>, <aside>, <video> or <canvas> so IE won't recognise width, height, margins or other layout or styling codes but you can make IE process existing styles and display like modern browsers as shown on blancer.com website
http://blancer.com/tutorials/wp/15301/10-ways-to-make-internet-explorer-act-like-a-modern-browser/
Note the conditional comment enclosing the link to the javascript file which enables new HTML5 tags to be styled:-
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
The above comments mean that HTML5/CSS3 can be used even though HTML5 and CSS3 are still in the development stage. However, the javascript file, as far as I can see, merely allows the new tags to be styled, ie background, width, height, margin, font, etc. but doesn't allow the new processing that is required for some of the new tags like <video>, <canvas> that require special processing, but there are often other ways to make IE process the new features (like the object and embed tags for audio and video). It means that you can use the new tags and the IE page will show the elements in the correct places with some styling without disrupting the page layout, but without processing the new features inside the elements unless you find another method.
Internet Explorer 9 Beta does not yet include support for some new semantic elements such as <header> and <aside>, but they are scheduled to be included in a future release (I haven't checked IE9 final release).
Many HTML5 features don't validate yet because they are new, but they should eventually as validators and browsers get up to date.
Look at browser support here:-
http://www.findmebyip.com/litmus/
-
Anth Winter reacted to BlueDreamer in First meeting with client.A few tips:
Be polite and courteous at all times - remembering to say thank you when you get given a cup of coffee goes a long way. And arrive on time!!!
Listen to your customers ideas and never rubbish them - sometimes ideas customers put forward are just plain daft or unworkable. In cases like these listen then provide useful feedback, eg "I like that idea, doing it like you suggest might not work, but if we did XYZ that would have the same outcome..."
If an idea is put forward but you don't know how to approach it, just tell them you need to do some research to find the best way of achieving what they want and you'll get back to them
Make notes, lots of notes, getting as much information as you can is vital so you understand what your customer wants.
Be prepared for a second meeting. Sometimes time can pass very quickly, especially if you strike a bond with the customer very quickly and you end up chatting a lot. One idea for the first meeting is to cover the basics and arrange a second or third meeting so you can go into more detail about specific things.
If you don't know the answer to a question make a note of it and arrange to reply with answer within a set time, eg "I need to investigate that problem a bit more, I'll get back to you in 48 hours with answer"
-
Anth Winter reacted to Acuity in 4 new shotsTook these last night..
Arson:
Nelsons Column:
National Gallery:
Medieval London:
-
Anth Winter reacted to Eskymo in Freelance ContractsI have had a load of requests over the past year, via PM, to supply my freelance contract...so instead of sending stuff out individually via PM, I've decided to set up a template with explanatory text for anyone to download and adapt to their own circumstances.
This is a contract that I came up with several years ago, with the help of a lawyer [personal friend]. I didn't want anything too technical or full of legal speak. Just wanted something simple, straightforward, that made sense and didn't confuse or intimidate in any way. So there are no major legal terms in the document at all...it simply does what it's meant to - lay out the information that client has supplied [the brief], say what you're going to do for them and how much your going to charge and what deadlines there are...
-----Edit 2011-----
These templates are now available as part of my latest e-book called "Freelance Contracts" - you get 12 pages of information, advice and instructions on how to use freelance contracts as well the contract template in .odt, .doc and .pdf format. You can also get just the templates without the e-book.
-
Anth Winter reacted to AdamConder in Get random image script.Yes got it working as intended!!!
Had to do:
$query = mysql_query("SELECT * FROM advert order by RAND() asc LIMIT 6", $connect);
For the random listing , Thankyou so much for your help!
-
Anth Winter got a reaction from AdamConder in Get random image script.my way around it was to create a function out of it, and not to set the $rand, so that it got a new image each time
HTML:
<?php include("advert.php"); ?> <li><img src="<?php getImage(); ?>" alt="Advert" title="Advert"></li> <li><img src="<?php getImage(); ?>" alt="Advert" title="Advert"></li> <li><img src="<?php getImage(); ?>" alt="Advert" title="Advert"></li> <li><img src="<?php getImage(); ?>" alt="Advert" title="Advert"></li> <li><img src="<?php getImage(); ?>" alt="Advert" title="Advert"></li> </body>
new PHP:
<?php /* By Matt Mullenweg > http://photomatt.net Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php Latest version always at: http://photomatt.net/scripts/randomimage */// Make this the relative path to the images, like "../img" or "random/images/". // If the images are in the same directory, leave it blank. function getImage() { $folder = ''; // Space seperated list of extensions, you probably won't have to change this. $exts = 'jpg jpeg png gif'; $files = array(); $i = -1; // Initialize some variables if ('' == $folder) $folder = './'; $handle = opendir($folder); $exts = explode(' ', $exts); while (false !== ($file = readdir($handle))) { foreach($exts as $ext) { // for each extension check the extension if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive $files[] = $file; // it's good ++$i; } } } closedir($handle); // We're not using it anymore mt_srand((double)microtime()*1000000); // seed for PHP < 4.2 $rand = mt_rand(0, $i); // $i was incremented as we went along echo $folder.$files[mt_rand(0, $i)]; // Voila! } ?>
-
Anth Winter got a reaction from AdamConder in Get random image script.in your mqsql database you could have something like
id, companyname, URL, imagename
with values of
digital winter, http://www.digitalwinter.co.uk, digitalwinter.jpg
then pull it from the database like so
$query = mysql_query("SELECT * FROM companys order by id asc LIMIT 6", $connection); while ($row = mysql_fetch_array($query)) { echo "<li><a href=\"$row['URL']\" title=\"$row['companyname']\"><img src=\"$row['imagename']\" /></a></li>"; }
or something along those lines.....
this would take away the random feature though... and display each entry as entered in the database
-
Anth Winter got a reaction from AdamConder in Get random image script.can you paste the error in?
-
Anth Winter got a reaction from AdamConder in Get random image script.ahh, its missing the wrap quotes, try this
echo "<li><a href=\"".$row['URL']."\" title=\"".$row['name']."\"><img src=\"".$row['imagename']."\" /></a></li>";
-
Anth Winter got a reaction from traxor in Clicking your own adslol here here! mines exactly like this
-
Anth Winter got a reaction from T_break in Time to get motivated !Hi greg, welcome.
you want to get started with HTML combined with CSS to start. and learn how to code to w3 standards.
in dreamweaver (i used to use this all the time) you should get used to only using code view. for html and css you dont really need a decent program, notepad will do. although dreamweaver offers features like coloring the code and guessing what code your typing etc so it can auto finish, rather than type every letter. quite handy.
www.w3schools.com - great learning resource
validator.w3.org - check your html to see if it is valid
jigsaw.w3.org/css-validator - check your CSS to see if it is valid
Only other thing you can do is look at websites you like to see how things are coded, find out how things work etc