Jump to content

enchance

New Members
  • Posts

    8
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://johnimbong.com

Profile Information

  • Gender
    Not Telling

enchance's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I haven't tested it yet, so you're saying that once I click the link which updates the variables which changes the "src" attrib it will also automatically reload the page?
  2. I'm trying to build a small portfolio and instead of using several HTML pages I wanted to just use PHP. What I have is an array of each image's path (for the "src" attribute). I was thinking when I click "Next" (a text link) it increments the array and once it has reloaded itself it would simply look at the query string then display the new image. I have some questions though: 1. What line do I use which will reload the page with the new incremented variables? 2. When the page reloads itself, will it automatically get the new image to load? I already placed $thisimage = $_GET['imagenumber'] at the very top so it updates the "src" attribute for the image. Thanks in advance. Any help/suggestions would be great, especially with that reloading part.
  3. Would any of you guys know the code to develop an inline commenting system on articles? Like the kind you see in blogs were a user posts a reply and it gets appended at the end of the page like magic.
  4. I'm currently using DreamWeaver (new to php) but I'm sure there are programs there developed for the power of php. I just wanted to find out what programs do you use and would you suggest for new guys?
  5. It occurred to me, is it possible I don't have a mail server configured? I opened up php.ini but I can't make heads of what's in it.
  6. I saw a problem and changed it which kind of fixed it but now I'm getting another problem: Edited line: "Date: " . $date . " " . $time . "\n" . //forgot the "." before $date New problem: 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 D:\xampp\htdocs\agi\_snippets\php\mail.php on line 31 Warning: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\agi\_snippets\php\mail.php:31) in D:\xampp\htdocs\agi\_snippets\php\mail.php on line 37 What could this be?
  7. I made an email form "contact.php" which makes use of the code below in a separate php file "mail.php" but I just can't get it to work. I'm kinda new to php. <? //assign the constants $agiemail = "email@agi.com"; $aginame = "AGI"; $inittxt = "WEB: "; //get the values $sender = $_POST['fName']; $subject = $_POST['fSubject']; $email = $_POST['fEmail']; $phone = $_POST['fPhone']; $msg = $_POST['fMessage']; $checkbox = $_POST['fCheckbox']; $date = date("l, F j, Y"); $time = date("h:i A"); //*****The error must be somewhere in the code below***** $header = "To: " . $aginame . "<" . $agiemail . ">\n" . "Subject: " . $inittext . $subject . "\n" . "From: " . $sender . "<" . $email . ">\n" . "X-Mailer: PHP 4.x"; $message = "\n**This message was sent from the AGI website**\n\n\n" . "Sender: " . $sender . "<" . $email . ">\n" . "Date: " $date . " " . $time . "\n" . "Reply by phone: " . $checkbox . "\n" . "Telephone: " . $phone . "\n\n" . $subject . "\n" . $msg; //send the mail + error messages if(mail($agiemail, $subject, $message, $header)) { header('Location: sent.php'); } else { header('Location: emailnotsent.php'); } ?> I keep getting the error message in my browser: Parse error: syntax error, unexpected T_VARIABLE in D:\xampp\htdocs\agi\_snippets\php\mail.php on line 25 Can you guys tell me what I'm doing wrong? I'm running it on localhost using the latest version of xamp. This is my first time working on 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.