Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'php'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 183 results

  1. I have been working on a website where users from all around the world would post their suggestions, upload photos and create events for hangouts and so on. Its just like a social network. I need to how to store the Data and time of all the users in the correct format so that it would be the best choice for the future of the website. For example if a user in US creates an event then a person in india seeing it must be seeing it correctly in his time format. If he chooses to fly to US and login's in US then the time for the user in that specific timezone must match. The thing is any where the user may be, any time or date related activity in the website must store the time which can be common to all. I am aware of the two things, UTC and GMT where both are similary but with the DST. I dono which one to use wether to use GMT or UTC. Should i calculate time by adding or subtracting the offset, or coverting the timezone stored to the timezone of the user. I also need to know how to get the timezone or the offset of the user for a specific region. Thanks.
  2. how can i add login and registration to the forum example in chptr 15? Why doesnt it tell u exactly how to do to implement the login functionality?
  3. In this example why does the procedural way fail with this error: Error: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, object given in /Users/joel/Sites/people_test/public_html/index.php on line 14 PHP: $dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() ); $q = "SELECT first_name, last_name FROM person LIMIT 0,30"; $r = mysqli_query($dbc, $q); Procedural: while($data = mysql_fetch_assoc($r)) { $rows[] = $data; } //prints out null echo json_encode($rows); OOP: while($data = $r->fetch_assoc()) { $rows[] = $data; } echo json_encode($rows); I thought I was doing the procedural way right from reading the PHP.net fetch_assoc() procedural and oop examples. Obviously I'm missing something. Could use some help seeing what it is.
  4. Edit: Nevermind do not worry about this thread. Apparently my action attribute for my login form should have been "index.php?p=login". When I give correct login info, it works correctly so I just need to fix the conditional for when the login info is incorrect. Okay so I tried setting up a modular website with the standard header + left sidebar, content, and right sidebar + footer. I also want to include the ability to register / login and put up a "Home | Login" or "Home | Settings" links up at the to of the header depending on whether someone is logged in or not. Now, for some reason when someone logs in successfully and the $_SESSION array is supposed to take in the data from the users table and then head to index.php, it seems that the $_SESSION array is not being set at all... it is empty. I am trying to figure out exactly what is going wrong here. Here is part of my login page: if(mysqli_num_rows($user_check_result) == 1) { //start of valid single match $_SESSION = mysqli_fetch_array($user_check_result, MYSQLI_ASSOC); //update most recent log in $last_logged_query = "UPDATE users SET last_logged_in = NOW() WHERE user_id = {$_SESSION['user_id']} LIMIT 1"; $last_logged_result = dbc_query ($dbc, $last_logged_query); if(mysqli_affected_rows($dbc) != 1) { //if one row was not affected $notes['last_logged_in_failure'] = "There was an error recording the login."; }//end of one row not being affected mysqli_free_result($user_check_result); if(isset($last_logged_result)) mysqli_free_result($last_logged_result); mysqli_close($dbc); $exit_url = BASE_URL . '/index.php'; header("Location: $exit_url"); exit(); } Also, since the else clause after this if clause is not being executed, and the page is being redirected to index.php I assume that the $_SESSION variable is being set. For some reason the redirect seems to be losing the $_SESSION array when it goes over to index.php. I even had to separate the login.php script into a login.inc.calc.php script to be executed befor ethe header.php file and a login.inc.out.php to be executed after the header.php file since a redirect has to occur before HTML output. A rar file of everything (except images) from my site (only 11kb because I just started it) is located here: http://ipredict.danconia.us/ipredict.danconia.us.rar This whole modular thing is making things a bit confusing and I'm wondering whether it's really worth it... if it might not be worth it to go back to the non-modular way of doing things. On the other hand I don't want to back down from a good challenge. Any help would be appreciated. Thank you! Edit: Also, for the record the first real line in index.php is a require('./includes/config.inc.php'); and that config file's first line is start_session(); so I just don't get why that wouldn't be occurring: /* * index.php (homepage) for http://iPredict.danconia.us * Script created by Kylan Hurt * http://kylan.danconia.us */ require('./includes/config.inc.php'); $errors = array(); $notes = array();
  5. Hello! I have been reading over the great guide for Stripe integration. Great stuff. Thank you for doing those posts. What I want to do though, is use the custom button CHECKOUT method, which is shown here: https://stripe.com/docs/checkout#api along with the "saving customer details for later", method. Which is shown here: https://stripe.com/docs/tutorials/charges#saving-credit-card-details-for-later Can these two things be combined with your methods at all? I am having no luck at all with this.
  6. Hello, I have been trying to get my form to validate the radio button which allows my user to agree to the terms and conditions, however, it either prints at the top of the page or not at all. The other prompts print near the form input which is what I would like to happen for the radio button. Following is my code. if (isset($_POST['radio_Agree'])) { $Agree = mysqli_real_escape_string($connect, $_POST['Agree']); } else { $reg_errors['radio'] = 'Please agree to the user Terms and Conditions.'; } <p><label> <input type="radio" name="Agree" value="Agree" /></label> <a name="Agree" id="Agree"></a>I agree to the user Terms and Conditions.<br /> <?php create_form_input('radio', 'Agree', $reg_errors); ?></p>
  7. Hi Larry, Great fan of you books! I've recently gone over Chapter 11 and I had a question regarding passing data from JSON to PHP using the code provided in the book for test.js (434-436). I've modified the script to use JSON and that works beautifully. I'd like to know if there is a clean JS solution to pass data to PHP without relying on jQuery.ajax({ data })? I've looked everywhere for a solution but the solution seems easily resolved with jQuery, but I'd like to avoid that if possible. Here is the code I've used as dictated in the book: window.onload = function() { 'use strict'; var ajax = getXMLHttpRequestObject(); ajax.onreadystatechange = function() { if ( ajax.readyState == 4 ) { if ( (ajax.status >= 200 && ajax.status < 300) || (ajax.status == 304) ) { var data = JSON.parse(ajax.responseText); var file = ''; file += 'Original: ' + data['org'].file + '<br>'; file += 'Processed: ' + data['pre'].file + '<br>'; document.getElementById('output').innerHTML = file; } else { document.getElementById('output').innerHTML = 'Error: ' + ajax.statusText; } } }; document.getElementById('btn').onclick = function() { ajax.open('POST', 'resources/test.json', true); ajax.setRequestHeader('Content-Type', 'application/json'); ajax.send(null); }; }; I would like to be able to echo out the data['org'].file and data['pre'].file in PHP after the request is made. Any guidance or suggesting would be appreciated.
  8. Per instructions and examples in the book, I am using javascript to initiate use of mysql within a php file to populate the data in a grid within my original javascript file. Everything works fine! However, sometimes, it takes a few seconds for the php file to complete running. I am finding that I need to disable the grid until the php file has completed. I know how to disable the grid using jquery $.blockUI(); and re-enable the grid using $.unblockUI(); using javascript commands in my javascript file. But I cannot figure out how to delay the $.unblockUI(); until the php file has completed. How can I do that? Thank you.
  9. Hello there! The thread referenced (at the bottom) covers how to display two forms on a single page. However . . . In the case referenced, both forms are visible on the page by default, and it is only *after* a submit has been detected that the script detects the form sent, and calls the appropriate code. It seems possible to display only one of the forms based on a user's site visit status. For example, assume a page contains code for both 'Form A' and 'Form B'. What I'm looking for is: 1) When the user visits the page for the first time, 'Form A' is displayed by default, then; 2) On any subsequent visit to the page by the same user, during the same session, 'Form B' is displayed by default. Of course, the submit still gets handled by the processing script, but that's already been covered in the thread referenced. What's got me snookered is how to determe the visitors status (i.e., new or return visit) so that the appropriate form can be displayed. ~ David Reference: http://www.larryullman.com/forums/index.php?/topic/1362-two-forms-on-one-page/
  10. version 0.5 Page 129 As I read this book, I keep scratching my head, wondering what's so good about OOP (Object Oriented Programming). The clips example is a case in point. Why write 5 lines of code when you can write just 2, like this? $stockQuote = 'AAPL: $533.25'; echo $stockQuote; I can modularize my procedural code by using includes. So how can all the fuss and bother of OOP be worthwhile? I've read plenty of rationales defending OOP, written by people who studied it in college, but it seems more like a religion to me. Sorry, I don't mean to offend anyone. I've read some books on OOP php, and I'm patiently reading through this one, only because I want to take advantage of the code that's automatically generated and tailored to whatever tables I need. But frankly, I will probably write most custom code, queries etc, as procedural php.
  11. I have gone into the database and explored what might happen after PayPal has been activated and is live. So I have manually changed some of the expiry dates of my users. This is my code when the registrant originally joins: $q = "INSERT INTO users (username, email, pass, first_name, mid_initial, last_name, agree, date_expires) VALUES ('" . stripslashes($u) . "', '$e', '" . get_password_hash($p) . "', '" . stripslashes($fn) . "', '" . stripslashes($mi) . "', '" . stripslashes($ln) . "', '$agree', SUBDATE(NOW(), INTERVAL 1 DAY) )"; Thus their expiry date is one day less than when they joined. The whole time I have been testing my site I have left these dates and my registrants have always been allowed into the site as long as their passwords and email are correct, even though the login form is asking for a date that is greater than or equal to NOW so that doesn't make sense to me. I am assuming NOW means right this minute. $q = "SELECT id, username, type, IF(date_expires >= NOW(), true, false) FROM users WHERE (email='$e' AND pass='" . get_password_hash($p) . "')"; SO I went in and changed some of the years from the current year to a year in the future. THESE registrants are not being allowed into the site. These registrants are getting the following error message when they try to login. $login_errors['login'] = 'The email address and password do not match those on file. '; This doesn't make any sense to me and I am wondering if this alone would keep the registrant from entering the site once paypal is integrated. I have found that one can only do so much testing when the site is "live" with PayPal because if you try to use a credit card too many times, PayPal blocks you. So I want to try to figure out as many bugs as I can beforehand. Marie
  12. After my web hosting company (1and1.com) switched from PHP 4 to 5, a script that once returned the current year A-OK no longer works; it now generates this error message that is e-mailed to me every time a page bearing this include is accessed: An error occurred in script '----------/includes/footer.php' on line 4: <br />date_default_timezone_get() [<a href='function.date-default-timezone-get'>function.date-default-timezone-get</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead <br />Date/Time: 1-30-2013 07:51:12 <br /><pre>Array .... Here is the code, including some changes I thought should correct the error or at least suppress the error messages: <?php if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get")) @date_default_timezone_set(@date_default_timezone_get()); // date_default_timezone_set('America/New_York'); $startyear = 2009; $currentyear = date("Y"); if ($startyear == $currentyear) { echo 'Copyright © 2009'; } else { echo 'Copyright © 2009 - ' . $currentyear; } ?> How can I fix this error?
  13. hi guys ! i have question about output buffering(chapter 18 page 561) i have searched google about it and it came with alot of debates, some say its good practice, some say its bad practice to use it, but they dont provide any code for testing why its good and why its bad.. so the question is : is it a good practice to always use it ? as Larry's statement in the book that says "There can be a performance improvement with output buffering, but the main benefit is that it eradicates those pesky headers already sent error messages." if its bad practice, please give good reasons + codes(if neccessary) to prove why its bad
  14. I have modified form_functions.inc.php to radio button for suit for me. But It seems its not working.. This is my code so far.. from form function if (preg_match('/sex\d{1}$/', $name)) { $i = substr($name, -1); $name = substr($name, 0, 3); $sex = array(1=>'Male', 'Female' ); // Display the error first: if (array_key_exists($name, $errors)) { echo ' <span class="inline-error">' . $errors[$name] . "</span>\n"; } echo '<input type="' . $type . '" name="' . $name . '" value="' . $i . '" /> ' . $sex[$i] . ' '; } This is from validation code.. // Check for gender: $sex = array(); for ($i=1, $count=2; $i <= $count; $i++) { if (isset($_POST['sex'. $i])) { $sex[] = $_POST['sex'. $i]; } } // end for loop if (empty($sex)){ $reg_errors['sex1'] = 'You have NOT entered your gender type!'; } This from HTML <div class="last-child"> <?php for ($i=1, $count=2; $i <= $count; $i++) { create_form_input('sex' . $i, 'radio', $reg_errors); } ?> </div> radio button working.. but validation not working its always going to error message.. hope someone help me out this.. thank you.
  15. Hello... I have a form to get some urls from users. Eg: Web Address, Facebook Address, Twitter Address, Google+ address etc... My problem is how I validate these urls when they submit the form. I tried to validate URL in PHP by using the FILTER_VALIDATE_URL or simply, using regular expression. Here, I would like to know what are the best methods to get such a urls from users. Is it always good to let them to enter protocol? sometimes they may not know it is http, https, ftp, ftps.. etc. I think it is something hard to do some users. I tried something like this using FILTER_VALIDATE_URL, But it always use protocol and sometime I am confusing how its work.. // validate url $url = '[url="http://www.example.com%27;"]http://www.example.com';[/url] if (filter_var( $url, FILTER_VALIDATE_URL)){ echo "<br>valid"; } else { echo "<br>invalid"; } [b]OUTPUT[/b] : valid // validate url $url = 'hp://www.example.com'; if (filter_var( $url, FILTER_VALIDATE_URL)){ echo "<br>valid"; } else { echo "<br>invalid"; } [b]OUTPUT[/b] : valid // validate url $url = 'http://example.com'; if (filter_var( $url, FILTER_VALIDATE_URL)){ echo "<br>valid"; } else { echo "<br>invalid"; } [b]OUTPUT[/b]: valid // validate url $url = 'http://example.com?id=32&name=kamalani'; if (filter_var( $url, FILTER_VALIDATE_URL)){ echo "<br>valid"; } else { echo "<br>invalid"; } [b]OUTPUT[/b] : valid Can you tell me what are the best ways to get urls from user and how those validate? Any comments are greatly appreciating.. Thank you.
  16. So I am looking at developing a jobsboard, which has three tables: Company - Store details of companies looking to advertise jobs, build profile. Jobs - Store details of Jobs being advertised for a certain period of time. Orders - Store details of the transactions for the jobs being posted. The way it works is the company completes registration form, then has the option of posting jobs which they will be charged a fix fee. Now what foreign key would I store in the Orders table? since I am using Paypal and don't know how much information you can carry over. Would I store the CompanyID or the JobsID or both? PHP5 MySQL 5 Chrome
  17. I am going to create a HTML form dynamically with php. Using that form users can select subjects under different category. A category and Its subjects have broken to one logical section and have applied jquery accordion. In my form I need to create more logical section like that. this is the HTML structure of the form..(which need to create dynamically with php) <form action="" method="post"> <div id="accordion"> <!-- logical section 1 --> <div> <h3>Category 01: <span>category name</span><span></span></h3> <div class="container"> <table> <tr> <td width="50%"> <input type="checkbox" value="1" name="subject[]">subject1 </td> <td width="50%"> <input type="checkbox" value="2" name="subject[]">subject2 </td> </tr> </table> </div> </div> <!-- logical section 2 --> <div> <h3>Category 02: <span>category name</span><span></span></h3> <div class="container"> <table> <tr> <td width="50%"> <input type="checkbox" value="1" name="subject[]">subject1 </td> <td width="50%"> <input type="checkbox" value="2" name="subject[]">subject2 </td> </tr> </table> </div> </div> </div> </form> Can anybody tell my where I am going wrong? I troubled how to create inner table with 2 columns.
  18. Hi ,this book are really good , simple and easy to understand , don't have any problem on understanding your words so far. I have apply to two of my project . This is not really a problem , just not sure where to start off . I was trying to improve the login system , because when the user forget to click the logout button , the session doesn't logout automatically.What i trying to do is make a session expire after 15 minutes of inactivity ? Any ideas ? [sOLVED] used this solution apply to include/config.inc.php just after the session_start() Hope this can helps $live = false; // Errors are emailed here: $contact_email = 'abc@gmail.com'; define ('BASE_URI','.'); define ('BASE_URL','www.domain.com/'); define ('MYSQL', BASE_URI . '/include/mysql.inc.php'); // Start the session: session_start(); $timeout = 15; // Set timeout minutes $logout_redirect_url = "index.php"; // Set logout URL $timeout = $timeout * 60; // Converts minutes to seconds if (isset($_SESSION['start_time'])) { $elapsed_time = time() - $_SESSION['start_time']; if ($elapsed_time >= $timeout) { $_SESSION = array(); // Destroy the variables. session_destroy(); setcookie (session_name(), '', time()-86400, '/'); // Destroy the cookie. header("Location: $logout_redirect_url"); } } $_SESSION['start_time'] = time();
  19. Hi, Having a bit of a problem with regard to someone logging in on my site. It will not display Register page if I include certain files. Here is my header.php file which stores all the navigation links, and the sign-in option or to display their profile options: <body> <section class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand text-info" href="http://www.webzoost.com" name="top">abaloo</a> <div class="nav-collapse collapse"> <ul class="nav pull-right"> <li><a href="http://www.webzoost.com/profiles/register.php">register</a></li> <li class="divider-vertical"></li> <li><a href="#">search</a></li> <li class="divider-vertical"></li> <li class="dropdown"> <?php if (isset($_SESSION['user_id'])) { echo '<a class="dropdown-toggle" href="#" data-toggle="dropdown">Your Profile <strong class="caret"></strong></a> <div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">'; } else { echo '<a class="dropdown-toggle" href="#" data-toggle="dropdown">sign in <strong class="caret"></strong></a> <div class="dropdown-menu" style="padding: 15px; padding-bottom: 0px;">'; require ('includes/login_form.inc.php'); } ?> </div> </li> </ul> </div> </div> </div> </section> Now the problem comes when i add the following files: - login.inc.php since when i put this file in my index.php file I cannot seem to link to any other part of the website such as "register" which then throws up a blank page, but if I take out the file all-together then register displays. So what I am saying is where do I put file (login.inc.php) with-out it interfering with other links on my website, also could it be a directory issue, I know larry has his navigation in the footer, but mine is in the header.php file. here is my directory setup: index profiles - register.php includes - login.inc.php - login_form.inc.php - header.php // This is where all my navigation is, and also the login form as well. - footer.php I am now getting the following error when I only view the source code, this error is not being displayed for some reason on output to the user(I can't find an option to paste a screenshot/image of the code): An error occurred in script '/home/sites/webzoost.com/public_html/includes/header.php' on line 52:<br /> require(includes/login_form.inc.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory<br /> <pre>Array<br /> Any comments, suggestions would be much appreciated. PHP5 MySQL5 Chrome
  20. Hello, I'm preparing for the Zend PHP 5.3 certification and I have bought all 3 of Larrys books on PHP (PHP for web, PHP & MySQL and Advanced PHP). Can anyone here suggest if it would be better to start with the PHP for web book ? Or should I skip and move to PHP & MySQL book directly ? Should I use any other training material besides these books ? Thanks
  21. Hi. I was just wondering how facebook does it's continious updates on the wall if you know what I mean, I take it after a certain amount of time it calls a scripts which then gets the latest round of updates. So what technologies would be used here ? and also how would you stop it from repeating it's-self(i.e. calling the same data from before) ? Also does anyone know of any examples of this ? Regards
  22. I'm hoping someone might be able to help me with a new problem that has arisen on one of the sites I maintain. I'm getting a PHP error that says: "It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead." The funny thing is, the code has been in place for years and we've never gotten these errors. Suddenly they began popping up. I'm guessing maybe the host did an upgrade the the PHP version on the servers, but don't know for sure. I have a php.ini file for the site and it in I have tried everything I can think of, including: date.timezone=UTC date.timezone=America/Chicago date.timezone=US/Central When I look at the phpinfo() file the changes I make in my php.ini file are reflected, but I still get this error. What am I doing wrong? Any advice would be greatly appreciated. Thanks!
  23. My question is mainly regarding Chapter 11, sub-chapter "Understanding HTTP Headers", Pg. 357 - but it also includes more general basic question. There's a line on Pg. 357: "Before getting to the example, note that if a script uses multiple header( ) calls, each should be terminated by a newline (\n) as in the preceding code snippets." Why? (The reason isn't explained in the book.) Also. I see that Larry is using \n quite liberally in his code. I want to understand the reasons. One of them, probably the main one, I guess, is to make the resulting HTML code more readable. What are other possible reasons?
  24. Hello, I am trying to implement this code into a php script. By itself on a separate page it works fine but wihint a php page I keep getting syntax errors. Thanks, Marie <textarea name="description" id="description" rows="5" cols="40" value="sdf" onkeyup="getCharCount(50)" /> </textarea> <div id="charCount"></div> <script type="text/javascript"> function getCharCount(limit) { var tArea = document.getElementById("description"), countDisplay = document.getElementById("charCount"); countRemains = limit - tArea.value.length countDisplay.innerHTML = "Total characters : " + tArea.value.length + " Remaining: " + countRemains; if (countRemains < 1) alert('Thats all folks'); } </script>
  25. I've been using a script to check submissions for proper email formatting. It looks like this: eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) Note, that I didn't write this script, it was provided by someone else. It's worked fine for years, but now I'm getting an error message saying the function has been deprecated. I think my host must have installed a new version of PHP, 5.3.2. That's cool, I just need to figure out what to replace this code with. I've done a little research and it seems there are several ways to approach this, including: 1. just replace "eregi" with "preg_match." 2. use "filter_var" and "FILTER_VALIDATE_EMAIL" instead. Any advice as to what would be the best way to update this script would be greatly appreciated. Thanks!
  • Create New...