Jump to content

c-o-d-e

Members
  • Posts

    127
  • Joined

  • Last visited

    Never

Everything posted by c-o-d-e

  1. The title is pretty simple. If I have a background image, with a border which is curved on the corners. (curvy corners) How do I get it so the excess background image isn't shown, or is curved.
  2. Genesis730 What you tried before still sent the emails without correct username and password. However, wildteen88 that is an excellent example. Though it still does the same as Genesis730! It's confusing me. if($username > 0 && $email > 0) { $query = mysql_query("SELECT * FROM Users WHERE Username = '$username' AND Email = '$email' LIMIT 1") or trigger_error("Query failed: ".mysql_error()); // if no rows was returned, the display an error. Username/email does not exist if(mysql_num_rows($query) == 0) { $error['uspa'] = 'The Username/Email address provided does not exist'; } else { // A match was found, reset the password for the given username here } } And I do have "if(!isset($error)){" before the password reset part too.
  3. if($username > 0 && $email > 0){ $query = mysql_query("SELECT * FROM Users WHERE Username = '$username'") or trigger_error("Query failed: ".mysql_error()); if(mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); if($username == $row['Username']) {} else { $error['username'] = '<span style="color:red;">The entered Username is not registered!</span>'; } elseif($email == $row['Email']) {} else { $error['email'] = '<span style="color:red;">The entered Email is not the registered email!</span>'; } } } There is an unexpected elseif. If I remove the elseif and just use if. It then happens if I enter the WRONG email address associated with the Username. It resets my password and sends an email to that address, and even with the wrong Username AND Email. It still sends!
  4. You are using two Else statements within an If statement, it causes an unexpected else. I understand you said it may not be correct syntax. I can't figure out the correct syntax though! Can you help? Also, with the query too.. can you help with that? Thanks.
  5. I have this code, you may of seen it in the other thread of mine. I made a tiny bit of changes. If both username and email have been entered, it checks if there is a row with the entered username. If there is, it checks if the email is registered with the username. If there is no row with the entered username, it should create the error. Instead, it carries on with the process. if($username > 0 && $email > 0){ $query = mysql_query("SELECT * FROM Users WHERE Username = '$username'") or trigger_error("Query failed: ".mysql_error()); if(mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); if($email == $row['Email']){}else{ $error['email'] = '<span style="color:red;">The entered Email is not the registered email!</span>'; } } else { $error['username'] = '<span style="color:red;">The entered Username is not registered!</span>'; } } However, with the following code at the bottom its suppose to update the database. Although using an invalid username, it shouldn't be able to do the query. It should fail. Though.. it continues with the success note. Even though it has an if statement so that if the query failed, it would not work. Yet it works, but nothing changes in the database as there isn't a row with that user! I don't see why!! Here is the querys etc. $query = mysql_query("UPDATE Users SET Password = '$pass' WHERE Username = '$username'") or trigger_error('Query failed: '. mysql_error()); $send = mail($email , "Password Reset Request" , "You have applied for a new password at Developers Community\n\nYour Username and New Password are below, Please change your Password when you login!\n\nUser: ".$username."\nPass: ".$pwd."\n\nIf you did not request a New Password, please change your Password and if this continues to happen then please contact us.\n\nPlease do not reply, this is an automated mailer.\n\nThanks", "FROM: no-reply@developers-community.com"); if(($query)&&($send)){ $success['complete'] = '<span style="color:red;">Your New Password has been sent to your Email Address. The Email could be in your Junk. If you do not recieve the email, please contact us.</span>'; }
  6. Oh! Update: I had an error call above the form for Password, it should be Email. Thats why nothing happened. When I type in my exact email address that I registered the account with. It comes up as "The entered Email is not the registered email!" Even though its correct! AND where i has {}{ for the email, Should be {}else{
  7. $query = mysql_query("SELECT * FROM Users WHERE Username = '$username'") or trigger_error("Query failed: ".mysql_error()); if(mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); if($email == $row['Email']){}{ $error['email'] = 'The entered Email is not the registered email!'; } } else { if($username > 0){ $error['username'] = 'The entered Username is not registered!'; } } If there is a row, it checks if the email matches the email of the registered username thats entered, if it matches then no error, so it carries on. If it does not match, report the error, else if there isn't a row by the entered username, and the username has more than 1 character to report the error that its not registered. I changed it so that I am only using mysql_real_escape_string() and I have now put in the single quotes where needed. I just set the error reporting to E_ALL, although in my php.ini it is always set as on. Although with the error reporting set to E_ALL, it doesn't give me any other error that I should not recieve.
  8. ($username > 0) Should be If username is bigger than 0. Would it be < ? I seem not to remember the < and >
  9. I have a password reset form, and it doesn't do anything when I click submit. It refreshes my page. Nothing happens. I don't recieve an email, I've tried to echo the password as soon as it gets created. Nothing echo'd. Seems that NOTHING happens at all. Can anyone help me out? Here is the code. <?php session_start(); include ("inc/config.php"); if(isset($_POST['reset'])) { $username = addslashes(mysql_real_escape_string($_POST['username'])); $email = addslashes(trim(mysql_real_escape_string($_POST['email']))); if(empty($username)){ $error['username'] = '<span style="color:red;">Your Username is required!<br /></span>'; } if(empty($email)){ $error['email'] = '<span style="color:red;">Your registered Email Address is required!<br /></span>'; } $query = mysql_query("SELECT * FROM Users WHERE Username = $username") or trigger_error("Query failed: ".mysql_error()); if(mysql_num_rows($query) > 0) { $row = mysql_fetch_array($query); if($email == $row['Email']){}{ $error['email'] = 'The entered Email is not the registered email!'; } } else { if($username > 0){ $error['username'] = 'The entered Username is not registered!'; } } if(!isset($error)){ $length = 9; $characters = 'abcdefghjkmnpqrstwxyz23456789'; $max = strlen($characters) - 1; $pwd = ''; mt_srand((double)microtime() * 1000000); while (strlen($pwd) < $length + 1) $pwd .= $characters{mt_rand(0, $max)}; $pass = md5($pwd.strtolower($username)); $query = mysql_query("UPDATE Users SET Password = '$pass' WHERE Username = '$username'") or trigger_error('Query failed: '. mysql_error()); $send = mail($email , "Password Reset Request" , "You have applied for a new password at Developers Community\n\nYour Username and New Password are below, Please change your Password when you login!\n\nUser: ".$username."\nPass: ".$pwd."\n\nIf you did not request a New Password, please change your Password and if this continues to happen then please contact us.\n\nPlease do not reply, this is an automated mailer.\n\nThanks", "FROM: no-reply@developers-community.com"); if(($query)&&($send)){ $success['complete'] = 'Your New Password has been sent to your Email Address. The Email could be in your Junk. If you do not recieve the email, please contact us.'; } } } ?> <?php echo ''.$error['username'].''.$error['password'].''.$success['complete'].''; ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" style="width:300px; margin:0 auto;"> <label>Username<br /> <input name="username" type="text" class="textBox" id="username" size="40" /></label> <label><br /> Registered Email Address<br /> <input name="email" type="text" class="textBox" id="email" size="40" /></label> <br /><br /> <input name="reset" type="submit" class="textBox" id="reset" value="Submit" /> </form>
  10. I have a login form, and when I put in the correct details, and click submit, nothing happens... the page refreshes, but I get no error, and neither do I get logged in. Instead of refreshing the page, so still on the page where nothing happened, I try login again. It then works. Although normally, when a user gets logged in, it uses $back = $_SERVER['HTTP_REFERER']; header("Location: $back"); When having this is, I get an error.. Warning: Cannot modify header information - headers already sent by (output started at /home/jeanie/public_html/login.php:12) in /home/jeanie/public_html/login.php on line 120 Maybe both the issues are related and when one is fixed the other will be too. It's probably a simple issue, but I haven't figured it out yet. Here is the full code. <?php session_start(); include ("inc/config.php"); include("inc/functions.php"); checkcookie(); ?> <!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" /> <meta http-equiv="Content-Language" content="en-UK" > <meta name="description" content="Developer's Community is a community dedicated to learning and teaching specific areas around computer development. We have a wide range of tutorials that cover all topics and we also have support forums for those who are needing a bit of support. The forums also consists of freelancing, and general discussions." > <title>Developer's Community - Login</title> <link href="styles/main.css" rel="stylesheet" type="text/css" /> <link href="styles/support.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="icon" href="images/favicon.ico"> <script type="text/javaScript" src="inc/cona.src.js"></script> <?php background(); ?> <script type="text/javaScript" src="inc/cona.src.js"></script> </head> <body> <!-- Begin Page --> <div id="container"> <!-- Header --> <div id="header"> <?php members_template(); ?> </div> <!-- Navigator --> <div class="navigator" id="dropdown"> <ul id="topnav"> <li><a href="/">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="tutorials.php" rel="tutorials">Tutorials</a></li> <li class="active"><a href="support.php" rel="support">Support</a></li> <li><a href="forums">Forums</a></li> <li><a href="feeds">Feeds</a></li> </ul> </div> <?php navigator(); ?> <script type="text/javascript"> cssdropdown.startchrome("dropdown") </script> <div id="subnavigation"></div> <!-- Main Content --> <div id="pageContent"> <div id="advertskyscraper"> <script type="text/javascript"><!-- google_ad_client = "pub-7463512441958618"; /* 160x600, created 03/01/10 */ google_ad_slot = "6049830800"; google_ad_width = 160; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div> <div id="fill"><center> <h1>Login</h1> <p>This login is not the same as the Forums. It's a seperate account temporarily, you may have to <a href="register.php">register</a>. <?php if(isset($_POST['login'])) { $username = trim(addslashes(mysql_real_escape_string($_POST['username']))); $password = md5(trim(mysql_real_escape_string($_POST['password']))); // Are the fields empty? if(empty($username)){ $error['username'] = '*'; } if(empty($password)){ $error['password'] = '*'; } // We then check if the user is banned $q = mysql_query("SELECT ExpireDate FROM Banned WHERE Username = '$username'") or trigger_error('Query failed: '.mysql_error()); if(mysql_num_rows($q) !=0){ $row = mysql_fetch_array($q); if($row['ExpireDate'] > time()){ $error['banned'] = 'You are banned until '.date("d/m/Y H:i:s", $row['ExpireDate']).'!'; } else { $query = mysql_query("DELETE FROM Banned WHERE username = '$username'") or trigger_error('Query failed: '. mysql_error()); } } // Now we check if the username or password entered is incorrect and if correct check if they are activated $query = mysql_query("SELECT * FROM Users WHERE Username = '$username' AND Password = '$password' LIMIT 1") or trigger_error('Query failed: '. mysql_error()); $row = mysql_fetch_array($query); if(mysql_num_rows($query) == 0){ $error['incorrect'] = 'Your username or password is incorrect. Please try again.'; } elseif($row['Activated'] == 0){ $error['activated'] = 'Your account is not activated.'; } // If no errors were found, continue with the login if(!isset($error)){ $row = mysql_fetch_array($query); $query = mysql_query("UPDATE Users SET Used = YEAR(CURDATE()) WHERE username = '$username'") or trigger_error('Query failed: '. mysql_error()); $_SESSION['s_logged_n'] = 'true'; $_SESSION['s_username'] = $username; $_SESSION['s_name'] = $row['Name']; if(isset($_POST['keep']) == checked){ $actkey = $row['Actkey']; $activated = $row['Activated'] > 0; $time = time() + 60*60*24*1000; setcookie(DC_5739487932, $username, $time); setcookie(DC_9640683492, $actkey, $time); setcookie(DC_2094892587, $activated, $time); } $back = $_SERVER['HTTP_REFERER']; header("Location: $back"); } else { $error['failed'] = 'There was an error processing your login, please try again'; } } ?> </p> <?php echo ''.$error['activated'].''.$error['banned'].''.$error['incorrect'].''.$error['failed'].''; ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" style="width:200px; margin:0 auto;"> <label>Username<?php echo $error['username']; ?> <input name="username" type="text" class="textBox" id="username" /></label> <label>Password<?php echo $error['password']; ?> <input name="password" type="password" class="textBox" id="password" /></label> <br /><label><input name="keep" type="checkbox" id="keep" />Keep Me Logged In<br /></label><br /> <input name="login" type="submit" class="textBox" id="login" value="Submit" /> </form> <p>Didn't get your validation email? <a href="resend.php">Click here</a> to resend the validation email.</p> <p>Need an account? <a href="register.php">Click here</a> to register, it's completely free! </p> <br /> </center></div> </div> <!-- Footer --> <div id="footer"> <?php footer(); ?></div> <!-- end Page --></div> <?php include_once("inc/analytics.php") ?> </body> </html> This uses function.php with some functions. The top bit of that file is.. session_start(); include("config.php"); Can you help?
  11. I have a set as homepage link, and it looks like this. <a href="javascript:history.go(0);" style="float:right" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.developers-community.com');">Set as Homepage</a> This only works on Internet Explorer, how can I make this more advanced to work with all if not most browsers? Thanks.
  12. I changed it to window.open(URL,id,"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 390,top = 150"); Although on firefox, it is still resizable. How can this be prevented. Thanks
  13. I don't really understand Evals, though that sets the options for the popup, along with the page to be displayed.
  14. The following code doesn't create a popup, displaying the page wicaptcha.php It does nothing, whats the problem? <script type="text/javascript"> function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500,left = 390,top = 150');"); } </script> <a href="#" onclick="popUp('/wicaptcha.php');">Whats this?</a>
  15. Sorry for bumping, this is a serious issue. I have no idea on the problem. Can someone please, please help me?!
  16. I made a test with this PHP code I have to send attachments. It works the way I want it to, perfectly. I put the code in with my contact form, changed the necessary parts. Saved it, uploaded the file. Filled it out, click send. The form sends, but no attachments get sent. I've compared both forms, the tested one and the contact form. I can't seem to find the problem. I'm assuming something is stopping the form from sending attachments. Though what is it? Cany anyone help me? Here is the whole file, instead of posting the form and the php, it's the whole file. Incase its something else where attacking it. If you need anymore pages of code (includes maybe) Let me know. I'll update the post. Here's the form <?php session_start(); include ("inc/config.php"); include("inc/functions.php"); checkcookie(); ?> <!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" /> <meta http-equiv="Content-Language" content="en-UK" > <meta name="description" content="Developer's Community is a community dedicated to learning and teaching specific areas around computer development. We have a wide range of tutorials that cover all topics and we also have support forums for those who are needing a bit of support. The forums also consists of freelancing, and general discussions." > <title>Developer's Community - Contact Us</title> <link href="styles/main.css" rel="stylesheet" type="text/css" /> <link href="styles/support.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="icon" href="images/favicon.ico"> <script type="text/javaScript" src="inc/cona.src.js"></script> <script src="multifile.js"></script> <?php background(); ?> <script type="text/javaScript" src="../inc/cona.src.js"></script> <script type="text/javascript"> image = "inc/pngimg.php" function Start() { tmp = new Date(); tmp = "?"+tmp.getTime() document.images["captcha"].src = image+tmp } </script> </head> <body> <!-- Begin Page --> <div id="container"> <!-- Header --> <div id="header"> <?php members_template(); ?> </div> <!-- Navigator --> <div class="navigator" id="dropdown"> <ul id="topnav"> <li><a href="/">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="tutorials.php" rel="tutorials">Tutorials</a></li> <li class="active"><a href="support.php" rel="support">Support</a></li> <li><a href="forums">Forums</a></li> <li><a href="feeds">Feeds</a></li> </ul> </div> <?php navigator(); ?> <script type="text/javascript"> cssdropdown.startchrome("dropdown") </script> <div id="subnavigation"></div> <!-- Main Content --> <div id="pageContent"> <div id="advertskyscraper"> <script type="text/javascript"><!-- google_ad_client = "pub-7463512441958618"; /* 160x600, created 03/01/10 */ google_ad_slot = "6049830800"; google_ad_width = 160; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div> <div id="fill"> <h1>Contact Us</h1> <span>If you are in need in contacting Developer's Community then do so using the form below. If you are not a registered member or not logged in then you will need to fill in a Captcha field to confirm you are a human-being.</span><br /> <br /> <div style="margin-left:30px; border:1px solid #fff; margin-right:30px;"> <?php if($_SESSION['s_logged_n']){ echo "Currently you are required to be logged out to use the contact us form. This is a temporarily solution."; } else { echo'<center>'; if(isset($_POST['submit'])){ $forename = $_POST['forename']; $surname = $_POST['surname']; $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]{1,})*\.([a-z]{2,}){1}$"; $email = $_POST['email']; $subject = $_POST['subject']; $message = $_POST['message']; $user_code = $_POST['captcha']; if(!$forename || !$surname || $forename == 'forenames' || $surname == 'surname'){ $error['name'] = '- <span style="color:red;">Required!</span>'; } if(!$email || !eregi($regex,($email))){ $error['email'] = '- <span style="color:red;">Required!</span>'; } if(!$subject || strlen($subject = trim($subject)) == 0){ $error['subject'] = '- <span style="color:red;">Required!</span>'; } if(!$message || strlen($message = trim($message)) == 0){ $error['message'] = '- <span style="color:red;">Required!</span>'; } elseif(strlen($message) < 10){ $error['message'] = '- <span style="color:red;">Below 10 characters!</span>'; } if (!$user_code){ $error['captcha'] = '- <span style="color:red;">Required!</span>'; } elseif ($user_code != $_SESSION['ckey']){ $error['captcha'] = '- <span style="color:red;">Incorrect try again!</span>'; } if(!isset($error)){ $to = "admin@developers-community.com"; $name = "$forename $surname - Guest"; $from = stripslashes($name)."<".stripslashes($email).">"; $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x"; $header = "From: $from\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed;\r\n" . " boundary=\"{$mime_boundary}\""; $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n".$name."\n\n"; foreach($_FILES as $userfile){ $tmp_name = $userfile['tmp_name']; $type = $userfile['type']; $name = $userfile['name']; $size = $userfile['size']; if (file_exists($tmp_name)){ if(is_uploaded_file($tmp_name)){ $file = fopen($tmp_name,'rb'); $data = fread($file,filesize($tmp_name)); fclose($file); $data = chunk_split(base64_encode($data)); } $message .= "--{$mime_boundary}\n" . "Content-Type: {$type};\n" . " name=\"{$name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; } } $message.="--{$mime_boundary}--\n"; $mail = mail($to, $subject, $message, $header); if(isset($mail)){ $to = $email; $name = "$forename $surname"; $email = "no-reply@developers-community.com"; $message = "Dear $name,\nThank you for your mail to us. Please wait patiently while we review it and get back to you. \nMeanwhile, You can use any of the other features within http://www.developers-community.com \n\n Your's Truly\nAdmin\nDeveloper's Community\n\nIn any case, do not reply to this email!"; $header = "from: Developers Community - Admin <$email>"; mail($to, $subject, $message, $header); } echo '<span style="color:red";>Your mail has been sent.<br /> You will recieve a reply within up to 48 hours. This may take longer on busy days.<br /> You should have recieved an email stating we have recieved your mail, this may be in your Junk Folder.</span>'; } } ?> <table width="36%" border="0"> <form action="" method="post" onSubmit="rememberinput('forename', 'surname', 'email', 'subject', 'message')"> <tr> <td> <div id="files_list"></div> <div style="margin-right:250px;"><span style="color: #F00">*</span>Your Full Name <?php $error['name']; ?><br /> <input type="text" name="forename" id=\"name" value="forename" onfocus="if(this.value=='forename'){this.value='';}" onblur="if(this.value==''){this.value='forename';}" class="textboxsup" size="22"/> <input type="text" name="surname" id="surname" value="surname" onfocus="if(this.value=='surname'){this.value='';}" onblur="if(this.value==''){this.value='surname';}" class="textboxsup" size="22"/><br /> <span style="color: #F00">*</span>Your Email Address <?php echo $error['email']; ?><br /> <input name="email" type="text" id="email" value="" <?php echo $_POST['email']; ?>"" size="50" class="textboxsup"/><br /> <span style="color: #F00">*</span>Subject <?php echo $error['subject']; ?><br /> <input name="subject" type="text" id="subject" value=""<?php echo $_POST['subject']; ?>"" size="50" class="textboxsup"/><br /> Add An Attachment (optional)<br /> <input id="my_file_element" type="file" name="file_1" size="45" style="font:100% Verdana, Arial, Helvetica, sans-serif;"></div> <script> var multi_selector = new MultiSelector(document.getElementById('files_list'), 6); multi_selector.addElement(document.getElementById('my_file_element')); </script> </td></tr> <tr><td><span style="color: #F00">*</span>Message <?php echo $error['message']; ?></td></tr> <tr> <td><textarea name="message" cols="90" rows="12" class="textboxsup" id="message" value=""<?php echo $_POST['message']; ?>""></textarea></td> </tr> <tr> <td><span style="color: #F00">*</span>Verfication<span style="width:149px;"> (Are you human?) <?php echo $error['captcha']; ?></span></td> </tr> <tr> <td> <div style="width:160px; float:right; margin-right:265px; margin-top:6px;"><span style="width:149px;">The answer is: <input name="captcha" class="textboxsup" id="captcha" size="5" maxlength="2" /> </span></div> <div style="width:149px; margin-right:300px;"> <span style="text-align: center"> <img src="inc/pngimg.php" alt="" width="148" height="30" style="border:1px solid #448DC4;" name="captcha"/> </span> <span style="text-align: center"> <a href="#" onclick="Start();">Refresh</a> <strong>/</strong> <a href="#" onmouseover="document.getElementById('tip').style.display='';" onmouseout="document.getElementById('tip').style.display='none';">Whats this?</a></span><br /> </div> <span id="tip" style="margin-left:120px; margin-top:3px; display:none"> A captcha is to check if you are human or not. It's required that you fill it in! </span></td> </tr> <tr> <td><input name="submit" type="submit" value="submit"/></td> </tr> </form> </table> <center><?php } ?></div> <br /> <br /> <br /> <br /> <br /> <br /> </div> </div> <!-- Footer --> <div id="footer"> <?php footer(); ?> </div> <!-- end Page --></div> <?php include_once("inc/analytics.php") ?> </body> </html>
  17. Hmm ok. Odd = empty, it doesn't look like its right, or fits in. Though if it's correct, I wont complain. In a function, you'd have.. return true, return false. What would that look like in index.php for function checkit() ?
  18. No. Though some webhosts would be kind enough to help change it for you, but it isn't done automatically.
  19. If I have a file - functions.php with "function checkit()" Within index.php page I include functions.php How would I call the fuction in index.php? Surely just saying "function checkit()" in the middle of no where is going to look a bit odd?
  20. I have christmas lights, and snow storms.. from a link I found via google. How would I activate the christmas lights and snow storms in december. If it's not december it wouldn't display them. eg: If(December){ Do affects; } I'm not sure how I'd get it to recognise the month - December. Any help? Thanks.
  21. The forum doesn't deal with completing other peoples homework.
  22. Yeah.. it was pretty much. Sorry.
  23. Don't BUMP topics. It decreases your likely hood for a reply. It does indeed sound like homework, and because of this I'll only answer a few. 1a) http://uk2.php.net/manual/en/book.overload.php 1b) http://uk2.php.net/manual/en/function.override-function.php 7) Create it however you want, organise it in folders, or have it all in the same directory. It would not affect anything. Unless it was tutorials for each language, then have the specific language folders. If not, then there is no point. Unless you are using "include something.aspx" or another language. If it's a file that you don't go onto itself, its included.. then you could put it in specific language folders for tidiness. It's all down to your personal preference. Look up mod_rewrite, it'll give you a better understanding. http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html - maybe? Use GOOGLE for your answers!
  24. HTTP = Hypertext Transfer Protocol Having HTTPS, means that it'll be secure. This is a further security feature which should you'll get by getting an SSL certificate from your webserver, and then changing the links to HTTPS and possibly setting HTTP to HTTPS using mod_rewrite.
  25. I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY there. If thats not possible, if I had..; $time = date("d-m-Y H-i-s" time()); or.. if I had $time = time(); I think I am 6 hours ahead PHPMYADMIN time. To set it in php.. would it be.. $t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though. $time = date("d-m-Y H:i:s" time()) + $t; // For the current date // Or like.. $t = 6 * 3600; // 3600 seconds in an hour, times it by 6. This could be 5 though. $time = time() + $t; // For the currunt unix timestamp Also, how would I change the PHPMYADMIN default timestamp.. so that when I enter the dates, it'll show up with .. the correct time for GMT-london. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.