Jump to content

signature16

Members
  • Posts

    46
  • Joined

  • Last visited

    Never

Posts posted by signature16

  1. I have a script that is using SSl with no problem.

     

    I've written my own script which I want to run in a secure environment. Unfortunately when I go to my page, it appears to be unsecured?? 

     

    I am accessing both pages from https://

     

     

    What do I have to include in my php page that I'm not doing?  Is there anything specific?

     

  2. I am trying to create a little "refer a friend" thing to put on a website.  There are six text boxes where a visitor can type in different emails.  When the visitors submits, I want a default email to go out to the emails given.

     

    How can I set it up so that 3 mail() commands are executed if 3 emails are entered.... or 6 mail() commands if 6 emails are entered? 

     

    Does that make sense?

     

    [attachment deleted by admin]

  3. This is the most frustrating thing I have experienced in a very long time.  For the love of god... please somebody help me.

     

    I have three pages of code processing a PayPal order..... but my problem is with setting sessions.

     

     

    Index.php > Collects name and email and sends to ReviewOrder.php.

    <?php
    session_unset();
    session_start();
    //$paymentType = $_GET['paymentType'];
    $_SESSION['paymentType'] = "Sale";
    ?>
    
    
    <html>
    <head>
        <title>Test PayPal Transaction</title>
        <link href="main.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <?php  print_r($HTTP_POST_VARS); ?>
    <form action="ReviewOrder.php" method="POST">
    First Name	<input type="text" name="firstName" />
    Last Name	<input type="text" name="lastName" />
    Email		<input type="text" name="customerEmail" />
    <input type="hidden" name="paymentType" value="<?php echo $_SESSION['paymentType'];?>" >
    <input type="hidden" name="paymentAmount" value="217.00" />
    <input type="hidden" name="currencyCodeType" value="USD" />
    <input type="submit" value="PayPal" name="submit"  />
    </form>
    
    </body>
    </html>
    
    
    
    ReviewOrder.php  > This page does some random PayPal stuff.  At the beginning of the page I can echo out all the sessions just fine. NO problem there.  Then if the PayPal order is a success... ReviewOrder includes "GetExpressCheckoutDetails.php".
    
    
    At the top of the last page... I try to echo out the session variables and it doesn't return any form information.
    
    This code:
    
    [code]
    <?php
    
    
    echo $_SESSION['firstName'] ;
    echo $_SESSION['lastName'] ;
    echo $_SESSION['customerEmail'] ;
    echo "<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><hr />";
    exit;
    ?>
    
    

     

    Produces this output

     

     

    First Name: Last Name: Email:

     

     

    ... it just forgets about the $_POST INfo.  WHATS GOING?!?!!? Please help!![/code]

  4. I created a very simple shoutbox.  User posts their name and a message and clicks post.  It posts to the database and when the page reloads, the "shout" is displayed.

     

    I would like to add categories to this little shoutbox application I created.  The user should be able to check off boxes to apply different categories to a post.  For example a shout could be in the categories, php,mysql,html and css.

     

     

    Logistically how do I do this using MySQL and PHP?  ... Obviously this is just a project for learning and has no real application.

     

    Thanks.

  5. I'm going to be honest with you.  That is not a very good website.  All the header images are low quality.

     

    The colors are a bad choice.  yellow,red,blue just isn't a color scheme worth using.

     

    Also, don't use tables for layouts.  Use DIVs  and CSS

     

    I guess the login system on the side looks fine, but you may as well trash the rest.

     

     

    Hope my opinion didn't offend you.  Good luck. 

  6. Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\Contact Form\contact.php on line 28

     

     

    This is what is in my php.ini and i restarted apache

     

    [mail function]

    ; For Win32 only.

    SMTP = mail.mydomain.com

     

    ; For Win32 only.

    sendmail_from = website@mydomain.com

     

  7. I have setup WAMP server on my computer and I want the server to use an external mail server (my webhosts).  My computer is running Vista and the mail server I want to use it running Linux.

     

    I can't figure it out from the PHP docs.

     

    Can somebody point me in the right direction?

  8. I've been trying to make my URLs friendly, but it never seems to work correctly.

     

    This is the code I'm using on my index page:

     

    <?php 
    $id = $_REQUEST['id'];
    if($id == "") {
    $id = "index";
    }  include "pages/$id.php";  
    ?>

     

    It creates links that look like this:  www.website.com/index.php?id=random-webpage

     

     

    How can I convert those links into:  www.website.com/random-webpage.php

     

     

     

     

  9. I have a page with a single textbox and submit button.  When the page is processed on itself, it emails somebody the response.

     

    When I get the email response, the message submited doesn't include line breaks.  How do I add line breaks?

     

    You can see in the code below that when $message (its inside $message1) is displayed, it doesn't add the appropriate line breaks if there should be line breaks there.  How can I fix that?

     

    
    <?php
    $submit = $_POST['submit'];
    $message = $_POST['message'];
    if( isset($submit) ) {
    
    $message1 = "<table width=\"500\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" style=\"border:1px solid #CCCCCC;\"><tbody><tr>
      <td><img src=\"http://www.theprrt.com/images/email/default-superspine-header.gif\" /></td>
    </tr><tr><td style=\"padding: 20px 30px; font-size: 10pt; font-family: Arial,Helvetica,sans-serif; line-height: 1.3em; text-align: justify\">
        <p> $message </p></td></tr><tr><td><br>
    <img alt=\"\" src=\"http://www.theprrt.com/images/email/email-footer.gif\"></td></tr></tbody></table>
    ";
    
    
    $headers  = "From: asdf<info@asdf.com>\r\n";
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    mail("aas@asdf.com","Feedback Question 1",$message1,$headers);
    echo "Thank you for the feedback.  If you requested a reply, we will get back to you as soon as possible.";
    echo "<br />";
    echo "$message<br />";
    }
    else{
    ?>
    
    

  10. I know this is probably a simple problem to solve, but I can't figure it out.  Please somebody help me!

     

     

    I am getting this error:

     

    Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\usersystem3\login.php:17) in C:\wamp\www\usersystem3\login.php on line 41

     

    Here is my pages code.  The include files just has the session start and the database connection. 

    <?php
    require_once('include.php');
    
    ?>
    
    
    
    <!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>Login</title>
    </head>
    
    <body>
    
    <form action="<?php $PHP_SELF; ?>" method="post" >
    Email<br />
    <input name="email" type="text" /><br /><br />
    Password<br />
    <input name="password" type="password" /><br />
    <input name="submit" type="submit" value="Log In" />
    </form>
    
    
    <?php
    $error = '';
    $form = $_POST['submit'];
    $email = $_POST['email'];
    $password = $_POST['password'];
    
    if( isset($form)	) {
    
     if( isset($email) && isset($password) && $email !== '' && $password !== ''	)	{
    
    	echo "everythg is filled out. yay!";
    	$sql = mysql_query("SELECT * FROM `usersystem` WHERE email='$email' and password='$password';");
    
    			if( mysql_num_rows($sql) != 0 ) { //success
    				$_SESSION['logged-in'] = true;
    				header('Location: redirect.php');  /// RAWR!!!! WHATS WRONG?!
    				exit;
    			} else { $error = "Incorrect login info"; }
    
    
     } else { $error = 'All information is not filled out correctly';}
    
    }
    
    
    echo "<br /><span style=\"color:red\">$error</span>";
    
    
    ?>
    
    
    
    </body>
    </html>
    
    
    
    

     

     

    Thanks for the help!

  11. Why is it important to have an Index in my MySQL database.  I am just messing around and PMA has this error on the structure page that says "No Index Defined".

     

     

    Can somebody explain why having an Index is so important?  I do understand that it makes searching quicker. 

×
×
  • 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.