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.

damindor

Members
  • Joined

  • Last visited

Everything posted by damindor

  1. what is wrong with this code? // validate the input, beginning with name $name = trim($_POST['name']); if (empty($name)) { $error['name'] = 'Please enter your name'; } here is the rest of the code <?php if (array_key_exists('ewComments', $_POST)) { // mail processing script // initialize variables $to = 'heunesc@gmail.com'; // use your own email address $subject = 'Feedback from East-West Seasons'; // build the message $message = 'From: '.$_POST['name']."\n\n"; $message .= 'Email: '.$_POST['email']."\n\n"; $message .= 'Comments: '.$_POST['message']; // send the email // remove escape characters from POST array mail($to, $subject, $message); } // remove escape characters from POST array if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); } // validate the input, beginning with name $name = trim($_POST['name']); if (empty($name)) { $error['name'] = 'Please enter your name'; } ?> <!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=iso-8859-1" /> <title>east west seasons</title> <?php /*include('style_rules.php');*/ ?> <script type="text/Javascript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_validateForm() { //v4.0 var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments; for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]); if (val) { nm=val.name; if ((val=val.value)!="") { if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@'); if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n'; } else if (test!='R') { num = parseFloat(val); if (isNaN(val)) errors+='- '+nm+' must contain a number.\n'; if (test.indexOf('inRange') != -1) { p=test.indexOf(':'); min=test.substring(8,p); max=test.substring(p+1); if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n'; } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; } } if (errors) alert('The following error(s) occurred:\n'+errors); document.MM_returnValue = (errors == ''); } //--> </script> </head> <body> <div id="wrapper"> <div id="titlebar"><img src="" alt="east west season" name="bluebellstop" width="738" height="32" id="bluebellstop" style="background-color: #00CC99" /></div> <div id="Main content"> <div id="nav"> <ul> <li id="thispage"><a href="index.php">Home</a></li> <li><a href="index.php">News</a></li> <li><a href="index.php">BLog</a></li> <li><a href="index.php">Gallery</a></li> <li><a href="index.php">Contact</a></li> </ul> </div> <h1>send us your comments</h1> <p>Duis aute irure dolor ut labore et dolore magna aliqua. Quis nostrud exercitation sunt in culpa lorem ipsum dolor sit amet. Excepteur sint occaecat ullamco laboris nisi ut labore et dolore magna aliqua. In reprehenderit in voluptate quis nostrud exercitation qui officia deserunt. </p><form action="<?php $_SERVER['PHP_SELF'];?>" method="post" name="Contact form" id="Contact form" onsubmit="MM_validateForm('name','','R','email','','NisEmail','message','','R');MM_validateForm('name','','R','email','','RisEmail','message','','R');return document.MM_returnValue"> <p> <label for="name">name:</label> <br /> <input type="text" name="name" id="name" /> </p> <p> <label for="email">email</label> <br /> <input type="text" name="email" id="email" /> </p> <p> <label for="message">message<br /> </label> <textarea name="message" cols="60" rows="6" id="message"></textarea> </p> <p> <input name="ewcomments" type="submit" id="ew comments" value="send comments" /> </p> </form> <p> </p> <div id="footer"> <?php include('copyright.php'); ?> </div> </div> </div> </body> </html>
  2. Thank you guys.I still have so much to learn but I decided to read another book in addition to the one I am reading now.The one I am reading now covers php in dreamweaver but I am going to start reading one about only php and learn to hand code everything.I will save this page and try the code tommorrow
  3. I cannot continue with my lessons until I figure out what is wrong with this bit of code.It is not very long and this is the error I get Parse error: parse error, unexpected ';' in C:\htdocs\phpdw\contact.php on line 2 <?php if(array_key_exists('ewcomments',$_POST); ( echo 'you clicked the submit button' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR...ransitional.dtd[/url] <html xmlns="[url="http://www.w3.org/1999/xhtml%22>"]http://www.w3.org/1999/xhtml">[/url] <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>east west seasons</title> <?php /*include('style_rules.php');*/ ?> </head> <body> <div id="wrapper"> <div id="titlebar"><img src="" alt="east west season" name="bluebellstop" width="738" height="32" id="bluebellstop" style="background-color: #00CC99" /></div> <div id="Main content"> <div id="nav"> <ul> <li id="thispage"><a href="index.php">Home</a></li> <li><a href="index.php">News</a></li> <li><a href="index.php">BLog</a></li> <li><a href="index.php">Gallery</a></li> <li><a href="index.php">Contact</a></li> </ul> </div> <h1>send us your comments</h1> <p>Duis aute irure dolor ut labore et dolore magna aliqua. Quis nostrud exercitation sunt in culpa lorem ipsum dolor sit amet. Excepteur sint occaecat ullamco laboris nisi ut labore et dolore magna aliqua. In reprehenderit in voluptate quis nostrud exercitation qui officia deserunt. </p><form action="<?php $_SERVER['PHP_SELF'];?>" method="post" name="Contact form" id="Contact form"> <p> <label for="name">name:</label> <br /> <input type="text" name="name" id="name" /> </p> <p> <label for="email">email</label> <br /> <input type="text" name="email" id="email" /> </p> <p> <label for="message">message<br /> </label> <textarea name="message" cols="60" rows="6" id="message"></textarea> </p> <p> <input name="ewcomments" type="submit" id="ew comments" value="send comments" /> </p> </form> <p> </p> <div id="footer"> <?php include('copyright.php'); ?> </div> </div> </div> </body> </html>
  4. Can somebody tell me how a online ebook store can have a page for every ebook they have and they have many thousands so they must use some database.WHat langauge do you think they use?Can you tell me more about how they do that.I am in the process of learning php and I know you cannot do something like that with plain html.If anybody can give me more information i will appreciate it thanks

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.