Jump to content

cyberRobot

Moderators
  • Content Count

    2,925
  • Joined

  • Last visited

  • Days Won

    24

cyberRobot last won the day on September 5

cyberRobot had the most liked content!

Community Reputation

116 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL
    http://www.cyberscorpion.com/

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

84,658 profile views
  1. Are you getting any errors? Did you check the server error log? Or is PHP set to display errors? Side note: file_put_contents() does all the work of fopen(), fwrite() and fclose(). More information can be found here: https://www.php.net/manual/en/function.file-put-contents.php
  2. For what it's worth, you could also use "w" and "j" with the same date() call. if (date('w|j') == '5|13') { //if Friday the 13th echo "You should have stayed in bed today"; } The straight bar ("|") isn't necessary. Just using that to separate the values. Of course, that's not as intuitive as "Friday 13".
  3. Barand already explained why the first image is missing. Since it sounds like there should be more than 2 images, did you try displaying the value of $result->num_rows? That will tell you the number of rows actually returned. If you're not getting the expected value, the query may be the issue.
  4. Alternatively, you could use an associative array for storing the player names. So your their.php file might look something like this: <?php $players = array( 'qb1' => 'John Doe', 'qb2' => 'Sam Smith', ); ?> Then your function and function call could be <?php function getplayer($position) { //GET PLAYER INFORMATION $file = "their.php"; require $file; //IF PLAYER FOUND, GET NAME $player = false; //set default value in case player isn't found if(isset($players[$position])) { $player = $players[$position]; } //RETURN RESULT return $player; } $player = getplayer('qb1'); var_dump($player); ?>
  5. That all depends on the person. Some will be fine, some won't, others will we be somewhere in between. To be honest, you'll never make everyone happy. The best you can do is try something and see how things go. If you're not getting the results you want, you can always adjust. Depending on how big your audience is and how much time you have for testing, you could develop 2 separate options of the sign-up process. One would require the users to validate the email address. The other would skip the validation. You could then use A/B testing to see which option results in more website signups. More information about A/B testing can be found here: https://en.wikipedia.org/wiki/A/B_testing
  6. Do you? I honestly don't remember. I've been a PHPFreaks member for quite a while. So I don't really remember the process. I'm also guessing that process has changed. For what it's worth, most websites I visit that require an email address during the account creation process just have two email address fields. The form then compares the two fields to make sure they match. I honesty don't think I've seen too many websites sending verification codes for users to copy / paste into the website. The verification code process mostly seems to be used before someone can reset their password on a website or with multi-factor authentication. Yes, there is a way to do that without JavaScript. You would just need to send the request back to the server. Basically, the customer would fill in their username, email address, and I would add the password field in the first form. Clicking the send my security code button would send the information back to the server using a normal POST request. The server would then display a second form where it asks for the security code that was sent to their email. The second form could also ask for the payment information. The second form sends the information back to the server. The server then displays the confirmation page.
  7. Yes, people are notoriously impatient creatures. I had someone honk at me the other day because I made a complete stop at a stop sign. Making a complete stop probably only takes 5 seconds. I don't know how many times I've heard of people complaining about how long it takes for a stop light to turn green (probably 120 seconds on average). I may have complained myself once...or more times. I know I definitely have a problem with watching advertisements before YouTube videos, which can usually be skipped after about 5 seconds. Many times I'll decide the video isn't worth the wait. Especially when the ad isn't skippable. As for online accounts, kicken's summary describes my feelings well. The only thing I would add / stress is there are products that I wanted and services that I wanted to use, but I really don't want to deal with anymore passwords or accounts. So I really need to want something (or kind of want several somethings) before I'm able to convince myself to create another account. With that said, feel free to proceed however you like. I'm not here to say you can't do something. 😊
  8. Just to clarify, I have no objections to what you are trying to accomplish. Having a valid email address can lessen the headaches involved with managing someone's account. My overall point was that the sign-up process should be as simple as possible, if your goal is to avoid cart abandonment. The priority is to collect the money you need to keep the website running and for the customer to have access to the content they want. Requiring email validation is a secondary goal in my opinion. I also think the customer should have the option to opt out of the email validation process, at their own risk. I personally would have the customer complete the sign-up form and payment details. Once that's done, the system would run the email verification process. Until the person verifies the email, the website could display a message whenever they log in about their email not being verified. Then it's up to the customer to do their part. As a bonus, all of this can be done without JavaScript.
  9. Are you able to show more of the code? How is $state being populated now? Never mind, you showed that already.
  10. So where does the data you are using to populate the array come from? Is it from a database query? If so, what does your query look like? What are the database column names? Could you also provide a couple database records?
  11. Have you considered multi-dimensional arrays? More information can be found here: https://www.php.net/manual/en/language.types.array.php Note that example 14, on the above page, shows an example of a multi-dimensional associative array: https://www.php.net/manual/en/language.types.array.php#example-70
  12. Does your website monitor the number of abandoned carts and the number of completed purchases? If not, that would be something worth looking into so it's easier to tell whether fixes like the one you are describing actually improve the number of completed purchases. For what it's worth, adding email verification in the middle of the order process seems like it would lead to the cart being abandoned more often. Visitors may not want to provide their actual email address. They may just want temporary access to your content. Be aware that forcing someone to verify their email doesn't necessarily mean you will receive valid email addresses. It's very easy to create a new email address, get the code from the message sent from your website, and abandon the new email address. I've done this myself several times in the past. Of course, I haven't done this with an account that required a credit card. I'm guessing it's not too difficult to get a temporary card for that step too. Or they may just decide your content isn't worth providing an email that you might use for marketing purposes...or sell to spammers. This is also a decision I've made with many content providers. For some visitors, they may not feel like they have the time to go through the extra step to verify the email. Perhaps they don't remember their email password and they're not at the computer with all their password sticky notes. Now if you collect the money up front and give them access to the website content, everyone gets what they really need. You can always remind them to verify their email later. I'm not really sure why the email verification process is that critical. The only time I can think of where that would be important is if you were auto-billing people. However, it seems like that should be a separate from where people opt into being charged to be re-subscribed in the future. That would be the form where you want to make sure the email is verified. That way you can send reminders in advance before charging the card down the road.
  13. The OP mentioned there would be an activation code in the email. I'm guessing there will be a form on the website that asks for the code to verify the email is indeed valid.
  14. For new accounts, I would personally collect all the information up front. Ask them to create their email and/or username, password, etc. The same page could also ask them to supply the payment information. Once the registration process is complete, you could run the process for validating the email. If it's really important for your website for that email to be valid, you could prevent the person from accessing the content that's hidden behind the login until the email validation process is complete. Alternatively, you could grant them access, but just have a note across the page saying their email address hasn't been validated. Then explain why validating the email address is important.
  15. Have you looked into using PHP's DOMDocument? More information can be found here: https://www.php.net/manual/en/class.domdocument.php Basically, you would need to load the HTML code into DOMDocument https://www.php.net/manual/en/domdocument.loadhtml.php Then you could use getElementsByTagName() to get the anchor tags https://www.php.net/manual/en/domdocument.getelementsbytagname.php Then loop through the anchor tags and use getAttribute() to get the href attribute https://www.php.net/manual/en/domelement.getattribute.php
×
×
  • 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.