Jump to content

Search the Community

Showing results for tags 'undefined'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. undefined variable errorString. what's wrong with this? Notice: Undefined variable: errorString in /Applications/XAMPP/xamppfiles/htdocs/finalproject/donate/thankyou.php on line 97 Notice: Undefined variable: messageString in /Applications/XAMPP/xamppfiles/htdocs/finalproject/donate/thankyou.php on line101 <?php require "config.php"; require "connect.php"; if(isset($_POST['submitform']) && isset($_POST['txn_id'])) { $_POST['nameField'] = esc($_POST['nameField']); $_POST['websiteField'] = esc($_POST['websiteField']); $_POST['messageField'] = esc($_POST['messageField']); $error = array(); if(mb_strlen($_POST['nameField'],"utf-8")<2) { $error[] = 'Please fill in a valid name.'; } if(mb_strlen($_POST['messageField'],"utf-8")<2) { $error[] = 'Please fill in a longer message.'; } if(!validateURL($_POST['websiteField'])) { $error[] = 'The URL you entered is invalid.'; } $errorString = ''; if(count($error)) { $errorString = join('<br />',$error); } else { mysql_query(" INSERT INTO dc_comments (transaction_id, name, url, message) VALUES ( '".esc($_POST['txn_id'])."', '".$_POST['nameField']."', '".$_POST['websiteField']."', '".$_POST['messageField']."' )"); if(mysql_affected_rows($link)==1) { $messageString = '<a href="donate.php">You were added to our donor list! »</a>'; } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Thank you!</title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body class="thankyouPage"> <div id="main"> <h1>Thank you!</h1> <h2>Add Yourself to our Donor Section</h2> <div class="lightSection"> <form action="" method="post"> <div class="field"> <label for="nameField">Name</label> <input type="text" id="nameField" name="nameField" /> </div> <div class="field"> <label for="websiteField">Web Site</label> <input type="text" id="websiteField" name="websiteField" /> </div> <div class="field"> <label for="messageField">Message</label> <textarea name="messageField" id="messageField"></textarea> </div> <div class="button"> <input type="submit" value="Submit" /> <input type="hidden" name="submitform" value="1" /> <input type="hidden" name="txn_id" value="<?php echo $_POST['txn_id']?>" /> </div> </form> <?php if($errorString) { echo '<p class="error">'.$errorString.'</p>'; } else if($messageString) { echo '<p class="success">'.$messageString.'</p>'; } ?> </div> </body> </html> <?php function esc($str) { global $link; if(ini_get('magic_quotes_gpc')) $str = stripslashes($str); return mysql_real_escape_string(htmlspecialchars(strip_tags($str)),$link); } function validateURL($str) { return preg_match('/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/i',$str); } ?>
  2. hi, can anyone tell me anything wrong with my coding as it keeps mentioned undefined index,id tambahitem.php
  3. <form name=\"form1\" ACTION=\"$_SERVER[REQUEST_URI]\" METHOD=\"POST\">Your First Name<br><input name=\"first\" value = \"$first\" type=\"text\" id=\"first\" size=\"25\"><br><br>Last Name<br><input name=\"last\" value = \"$last\" type=\"text\" id=\"last\" size=\"25\"><br><br>Email<br><input name=\"email\" value = \"$email\" type=\"text\" id=\"email\" size=\"25\"><br><br>Telephone Number<br><input name=\"phone\" value = \"$phone\" type=\"text\" id=\"phone\" size=\"25\"><br><br><label for=\"comments\">Comments</label><textarea name=\"comments\" cols=\"18\" rows=\"4\" class=\"txt\" id=\"comments\"></textarea><div style=\"visibility:hidden\"><input name=\"email2\" type=\"text\" size=\"45\" id=\"email2\" > </div><input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"tpc4\"></form>\n"; Hi I am getting the error message Notice: Undefined Index on the following form before submission I would like to fix this rather than suppress errors Any help would be much appreciated
  4. Hello all, I dont know why I'm getting this error with calculating the duration for the video, everything works fine with uploading, file is going in my database and folder, the duration of my video is ok. ​http://prnt.sc/e59i4f here is my code: // video duration ob_start(); passthru("ffmpeg -i $tmp 2>&1"); $duration = ob_get_contents(); ob_end_clean(); $search='/Duration: (.*?)[.]/'; $duration=preg_match($search, $duration, $matches, PREG_OFFSET_CAPTURE); //error is on this line botom $duration = $matches[1][0]; ​//error is on this line botom list($hours, $mins, $secs) = split('[:]', $duration); //echo "Hours: ".$hours." Minutes: ".$mins." Seconds: ".$secs; $duration=$hours.':'.$mins.':'.$secs;
×
×
  • 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.