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.

warren

Members
  • Joined

  • Last visited

  1. Hi Adi Are you on shared hosting? Also, the edit feature is there for a reason
  2. #subnavlist li.active a { color: #ff9900; text-decoration: none; } ? Or am I totally missing what you're saying
  3. I took this from your a:hover css #navcontainer ul li a.current { color: #003277; background-color: #ffffff; padding: 0.3em 0.8em; margin: 0; } This, in my Firefox, gives your home link a 'selected' style the same as your hover style If you were also need to know about how to make each one appear as current when browsing just reply
  4. warren replied to TypucT's topic in Frontend
    You can use $_COOKIE . If you set the cookie name like $name = 'myCookie'; $myCookieValue = $_POST['inputnamewithvalueIwant']; setcookie($myCookie", $myCookieValue, time()+3600); Then to access the cookie you'd use echo $_COOKIE[$name']; eg <input name="name" type="text" value="<?=$_COOKIE[$name];?>" /> I do not recommend using any of this example in an actual live site. Lol.
  5. Having the "Welcome username" with styles/whatever you call it prob isn't a good idea. Nice design so far tho
  6. Thanks RobH. I'll certainly give this idea a go. The way my current projects go, all my classes are included via the config file / looping file. It's just accessing classes in other classes that's a pain. So would function __autoload be a method of the current class I'm work in? Or just an alone function in a config file somewhere? This idea looks promising, cheers.
  7. CMSMadeSimple is decent for just that. Being a simple, template based, content manager. Used it a few times in the past, clients generally pleased. It's not bloated like alot of CMS's out there which is good. One thing to look at when choosing a CMS is the community surrounding it. Why? This is a good way of judging further development, bug fixes, community modules etc etc.
  8. Oh mate, Cheers for that. Life saver! thank you!
  9. HELLLOOOO This is driving me nuts I'm trying to global an object instance dynamically to then call methods etc. So, we know how to call variables dynamically $testvar = 'My calling'; $varstring = 'testvar'; echo $varstring; //Would just echo a string, 'testvar' echo ${$varstring}; // This would actually call the variable $testvar and echo 'My calling' We also know how to global variables/instances //Outside scope $success = new Success; //In a function/method global $success; $success->add('OMG THE INTERNET WORKS'); We can dynamically global variables //Somewhere outside the scope $string = 'This is my string'; //Somewhere inside scope $var = 'string'; global ${$var}; echo ${$var}; // would echo 'This is my string' But I can't do it with instances //Somewhere outside scope $success = new Success; //In side the function/method $instance = 'success'; //This could actually be anything, like info, error, alert, etc etc global ${$instance}; //This actually appears to global the correct instance ${$instance}->add('errorzor'); // Something goes wrong here or above I can't get it to call $success's add method. Any ideas appreciated.
  10. Blog doesn't load EDIT: work internet sucks
  11. It's actually pretty easy. My advice isn't to have 2 separate html pages but instead use some php to decide the output. Using a page with your current template, you could write something like this: ( This isn't an exact example, and I haven't tested it ) This code goes at the very top of the page ------------------------------------------------ <?php $showForm = 1; if($_POST['contactForm']) { $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) { $error = "<h4>Invalid email address</h4>"; $error .= "<a href='java script:history.back(1);'>Back</a>"; } elseif ($subject == "") { $error = "<h4>No subject</h4>"; $error .= "<a href='java script:history.back(1);'>Back</a>"; } else { $my_email = 'info@webexpress-uk.com'; $message = ' Message from: '.$name."\n\n".' Address: '.$email."\n\n". $name .' wrote: '."\n\n".$message; if (mail($my_email,$subject,$message)) { $showForm = 0; $success .= "<h4>Thank you for contacting us</h4>"; } else { $error = "<h4>An error has occured. Please click back and try again or send an email to info@webexpress-uk.com</h4>"; } } } ?> ------------------------------------------------ //All your html, head, body etc etc This goes in the area your form is ment to display ------------------------------------------------ <?php //Code here determines if we display the form or not echo $success if($showForm == 1) { echo $error; ?> <form id="contact" action="contact.php" method="post" onsubmit="return configForm(this);" style="position: relative; z-index: 1;"> <p> <input type="text" name="name" value="Name" class="width75" onfocus="clearValue(this, 'Name');" onblur="fillValue(this, 'Name');"/> </p> <p> <input type="text" name="email" value="E-mail" class="width75" onfocus="clearValue(this, 'E-mail');" onblur="fillValue(this, 'E-mail');"/> </p> <p> <input type="text" name="subject" value="Subject" class="width75" onfocus="clearValue(this, 'Subject');" onblur="fillValue(this, 'Subject');"/> </p> <p> <textarea name="message" rows="5" cols="80" onfocus="clearValue(this, 'Message');" onblur="fillValue(this, 'Message');">Message</textarea> </p> <p> <input type="submit" name="contactForm" value="SEND" class="button" /> <input type="reset" value="RESET" class="button" /> </p> </form> <?php } ?> //Rest of your template html ------------------------------------------------ Since you're using PHP and HTML is the same page, you'll need to rename it to something.php, then the form's action="" will need to match the filename. See how it goes Also your error messages might need to be updated, as you wont need to "go back" anymore, seeing as you'll still be on the same page.
  12. Try this.. <?php $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) { echo "<h4>Invalid email address</h4>"; echo "<a href='java script:history.back(1);'>Back</a>"; } elseif ($subject == "") { echo "<h4>No subject</h4>"; echo "<a href='java script:history.back(1);'>Back</a>"; } else { $my_email = 'info@webexpress-uk.com'; $message = ' Message from: '.$name."\n\n".' Address: '.$email."\n\n". $name .' wrote: '."\n\n".$message; if (mail($my_email,$subject,$message)) { echo "<h4>Thank you for contacting us</h4>"; } else { echo "<h4>An error has occured. Please click back and try again or send an email to info@webexpress-uk.com</h4>"; } } ?>
  13. Actually I have a friend who is in need of a voice over artist. When the website is up please let me know
  14. 1: Open dream weaver and use find and replace on a directory. If you don't have dream weaver, warez it. 2. Download winscp (my recommendation, there are plenty out there). You should have an ftp client if you're making websites. The majority of ftp apps allow for chmod changes. CHMOD: File Permissions (777,666 stuff) Basically CHMOD is the linux file permission system, unlike windows, lunix allows you to set specific permissions for files. This is what these numbers represent: Each number is the permission for a specific group Owner: R(4) W(2) X(1) Group: R(4) W(2) X(1) Others: R(4) W(2) X(1) The settings are Read, Write, and Execute. Any combination of these settings is allowed, and thus the sometimes random makeup of numbers. To allow reading is 4, 2 is writing and execution is 1. For example: 664, The first 6, means reading and writing for owner ( 4 + 2), same for group, but others only get reading (4) Hope this has helped, allot can be found if u Google CHMOD. 3: Copyright, no idea sorry.
  15. .. elseif (mail($name,$email,$subject,$message)) { .. The mail function is a bit wrong, http://nz2.php.net/manual/en/function.mail.php The mail function requires 3 parameters to function. To: This is the address the email is going TO, from FROM, the current $email variable in your script is the FROM address Subject: This is the subject of the email, how you've got it right now is correct Message: Again the message body, using the right method so far. So to rewrite your mail function $my_email = 'my_personal_address@mysite.com'; mail($my_email,$subject,$message); You will need to build up the message, containing their name, email, and message. For example $message = $name . $email . $message; This is the simplest idea, some formatting could be added. For example $message= ' Message from: '.$name."\n\n".' Address: '.$email."\n\n". $name .' wrote: '."\n\n".$message; This would give the equivalent formatting, Message from Warren Address: warrensemail@email.com Warren wrote: Hello Aled I like your hair cut. Have a nice day There can be more advancement but if we get this going we can see about them later EDIT: also change $HTTP_POST_VARS to $_POST $name = $_POST['name']; also, I like your website's design

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.