Jump to content

essaydoctor

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by essaydoctor

  1. What does a "private" area of a website involve?Webhooks, tokens, APIs? I am developing a website which will allow registered users to register, make a payment, and then get transferred to an area where they write an online essay in a textarea. I DON'T WANT NON-PAYERS TO GO HERE. The payment mechanism that I want is STRIPE.COM or one of its 3rd party affiliates, such as gohelium.com or spacebox.io . With STRIPE (or one of its affiliates, such as gohelium.com or spacebox.io), it's very easy to setup, and after a person makes a payment, I have no problem making them visit any page after that, even cnn.com or reddit.com . However, what I'm wanting to do is redirect them to a site within my webpage that only payed members can enter. I don't want a non-payer to be able to be able to visit this site. My site is being developed in PHP. How do I create the most austere and simple re-directed site for payed users?
  2. I'd like to create a textarea such that when one textarea is complete, another identically-sized text area magically appears and floats to the right. The new "spill over" text would now be here. Another way to explain what I'm looking for is this: Open up MS Word, and view the screen at 25%. Now keep on typing or keep adding text. Notice that when the words start "spilling over", a new sheet of paper (i.e. textarea) appears? This is what I'm interested in doing, but with HTML and/or CSS. So far, here is my source code. It's very basic for now. HTML SOURCE CODE: <!doctype html><html lang="en"><head> <meta charset="utf-8" /> <link rel="stylesheet" href="theTextArea.css"></head><body> <textarea id="theTextArea" spellcheck='false' cols="185" rows="33" ></textarea></table> </body> </html>----------------------------------------------------------------------------------CSS SOURCE CODE:#theTextArea { -webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px;margin: 5px 5px 5px 5px;background: #ffffff;border-top: 10px solid black;border-bottom: 10px solid black;border-right: 10px solid black;border-left: 10px solid black;padding: 10px;font: 18px tahoma; }
  3. This is what the code looks like in it's entirety, and I'll be sure to point out LINE 31. # Check form submitted.if ($_SERVER['REQUEST_METHOD'] == 'POST'){ # Check Subject and Message Input. if ( empty($_POST['subject'] ) ) { echo '<p>Please enter a subject for this post.</p>'; } if ( empty($_POST['message'] ) ) { echo '<p>Please enter a message for this post.</p>'; } # On success add post to forum database. if( !empty($_POST['subject']) && !empty($_POST['message']) ) { # Open database connection. require ( '../connect_db.php' ) ; # Execute inserting into 'forum' database table. $q = "INSERT INTO forum(first_name,last_name,subject,message,post_date) #THIS LINE BELOW IS LINE 31. VALUES ('{$_SESSION[first_name]}','{$_SESSION[last_name]}','{$_POST[subject]}','{$_POST[message]}',NOW() )"; $r = mysqli_query ( $dbc, $q ) ; # Report error on failure. if (mysqli_affected_rows($dbc) != 1) { echo '<p>Error</p>'.mysqli_error($dbc); } else { load('forum.php'); } # Close database connection. mysqli_close( $dbc ) ; } }
  4. Whenver I type in apostrophes (and probably other characters - haven't tested) in a text box, I get the following error message: Notice: Use of undefined constant first_name - assumed 'first_name' in C:\Program Files\PHP5\Abyss Web Server\htdocs\post_action.php on line 31 What should I do to allow apostrophes and other characters?
×
×
  • Create New...