Jump to content

Search the Community

Showing results for tags 'error'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 40 results

  1. Hello, all! I want to create a sign-up page, then i make signup.html and signup.php ...The signup html goes well, but the signup php doesn't.. Please check what's wrong with my code... signup.html <!DOCTYPE html><html><head><title>Sign Up Now!</title><link rel="stylesheet" type="text/css" href="signup.css" /></head><body><h1>Sign up now and get the gifts!<h1><h3>Type down your identity !</h3><form method="post" action="signup.php"><fieldset><legend>Sign Up</legend><label for="fname">First Name:</label><input type="text" id="fname" name="fname" /> <label for="lname">Last Name:</label><input type="text" id="lname" name"lname" /> <label for="email">Email</label><input type="text" id="email" name="email" /> <label for="country">Country</label><input type="text" id="country" name="country" /> <label for="gender">Gender</label><input id="gender" name="gender" type="radio" value="male">Male<input id="gender" name="gender" type="radio" value="female">Female <label for="reason">Why do you want to join us ?</label><textarea id="reason" name="reason"></textarea> <input type="submit" value="Sign Up!" name="submit" /></fieldset></form></body></html> signup.php <!DOCTYPE html><html><head><title>Thanks for signing up!</title></head><body><h2>Wait till the admin validates your account</h2><?php$name = $_POST['fname'] . " " . $_POST['lname'];$email = $_POST['email'];$country = $_POST['country'];$gender = $_POST['gender'];$reason = $_POST['reason']; echo 'Thanks for signing up, ' . $name . '';echo 'Those datas you input will be emailed to admin' . '';echo 'Name : ' . $name . '';echo 'Email : ' . $email . '<br/>';echo 'Country : ' . $country . '';echo 'Gender : ' . $gender . '';echo 'I join this because ' . $reason;?> </body></html> When i fill in the form, then submit them.. Then the signup.php appears and the output is below Wait till the admin validates your account Notice: Undefined index: lname in C:xampphtdocsphpsignup.php on line 9Thanks for signing up, aaaaThose datas you input will be emailed to adminName : aaaaEmail : aaaa@aa.comCountry : aaaaGender : maleI join this because i like it Please fix this... P.S. I run it in localhost
  2. Multidimensional array error

    <script>int[][] num = new int[4][5];num[1][1]={0,1,2,3,4};alert(num[1][2]);</script> This give my an error " Uncaught SyntaxError: Unexpected token ] " (shown by chrome) #for the "int[][] num = new int[4][5];" line Please help.
  3. On my register page when i enter character to username field google chrome console will give me this error: Uncaught TypeError: Cannot read property 'name' of undefined Fix would be awesome
  4. where clause error... ideas?...

    ok, just quick... im getting this when trying to login: Unknown column 'e5035533a816cac4c54012281f58543d' in 'where clause' and this is my takelogin.php file: /*==========RUN LOGIN PROCEDURE===============*/$uname = sqlesc($_POST['username']); /*Form Names...*/$pass = sqlesc($_POST['password']); /*Form Names...*/if(isset($pass)){$passhash = md_5($pass); /*Securing The Data...*/}$query = "SELECT * FROM users WHERE username = $uname AND passhash = $passhash AND enabled = 'yes' AND status = 'confirmed'";$query_result = mysql_query($query)or die(mysql_error());//Running query to the DB...if(mysql_num_rows($query_result) == 1)/*if the DB returns somfthing, then run...*/{$row = mysql_fetch_array($query_result);$_SESSION['uid'] = $row['u_id'];$_SESSION['username'] = $row['username'];$_SESSION['pass'] = $row['passhash'];$_SESSION['status'] = $row['status'];$_SESSION['enabled'] = $row['enabled'];$_SESSION['email'] = $row['email'];$_SESSION['ip'] = $row['ip'];$_SESSION['class'] = $row['class'];$_SESSION['time_offset'] = $row['time_offset'];$_SESSION['dst_in_use'] = $row['dst_in_use'];$_SESSION['auto_correct_dst'] = $row['auto_correct_dst'];header('Refresh: 3; url=index.php');//with time delay...}else/*Error messeage...*/{$HTMLOUT .= "<center>Error reading login-session coding base, or a wrong username/pass inserted...</center>";header('Refresh: 3; url=index.php');//with time delay...}/*==========RUN LOGIN PROCEDURE===============*/ any ideas? Oo...
  5. hello...everyone. im getting this error whenever i start my system .on Desktop it will show this Error"call was canceled by the message filter.(Exception from HRESULT:0x80010002(RPC_E_CALL_CANCELED))"i donno what it is...please someone help me...im using Asus X54H ,Windows 7.. Thanku..!!
  6. PDO SQLSTATE[HY000]: General error

    hey guys, I'm trying to switch my mysql connections over to PDO but I'm having a hard time. I've read a section on it in the php book I'm reading, I watched the phpacademy,org tutorial on it, I've read the section on it here at w3schools and I can't get it working. I've also posted it on 2 other forums and no one has yet to figure out where the problem is and it's eaten up 2 days of my time as well. If I can't get it figured out today I'm seriously thinking of going back to using the old mysql functions because they worked right the first time and have never given me an ounce of trouble. It's just very frustrating that my registration/login system was working perfect and then I upgrade and nothing works and no one can figure it out. . . It says the error is on line 142, which is the fetchAll() function line. Thanks for any help you guys can offer! Here is the connection script <?php// Connects to Our Database$db_host = "localhost";$db_user = "root";$db_password = "";$db_database = "game_db";try{ $conn = new PDO ('mysql:host=localhost;dbname=game_db', $db_user, $db_password);$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);} catch (PDOException $e) { echo 'ERROR: ' . $e->getMessage();}?> And the query thats giving me the trouble $sql = "INSERT INTO `player_data` (`username`, `empire_name`, `ruler_name`, `founding_group`, `government`, `population`, `currency`, `p_currency`, `scrap`, `food`, `fuel`, `salvage_wpn`, `scrap_wpn`, `morale`, `initiative`, `influence`, `farms`, `housing`, `scrap_yards`, `barracks`, `taverns`, `scouts`, `militia`, `infantry`, `heavy_infantry`, `technicals`, `tanks`, `gate`, `tower`, `wall`, `tunnels`, `dogs`) VALUES (:user, :empire_name, :ruler_name, :founding_group, :government, 25, 1000, 100, 1000, 1000, 0, 0, 5, 10, 100, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; $query = $conn->prepare($sql); $query->bindValue(':user', $user, PDO::PARAM_STR); $query->bindValue(':empire_name', $empire_name, PDO::PARAM_STR); $query->bindValue(':ruler_name', $ruler_name, PDO::PARAM_STR); $query->bindValue(':founding_group', $founding_group, PDO::PARAM_STR); $query->bindValue(':government', $government, PDO::PARAM_STR); try { $query->execute(); } catch (Exception $e) { exit($e); } $row_count = $query->fetchAll(PDO::FETCH_ASSOC);
  7. data type mismatch

    When I try to run this update query in ms access 2007 I get an error box message that says "Data type mismatch in criteria expression". I know the problem is at the end around replace(property.[park city]," ","")=replace(locations2011.city," ",""). But I checked the data types for all the related columns, which is text, and they all match for both tables. If I put quotes around property.[park city] or remove the replace function from it, the query will run but obviously not how I want it to. I've tested this code with a smaller table and it works so what's the problem? UPDATE property, locations2011 SET property.county = locations2011.countyWHERE property.county Is Null And property.[park state]=locations2011.state And replace(property.[park city]," ","")=replace(locations2011.city," ",""); I know I can just remove all the spaces from the property table with ctrl+h replace all but I'd rather leave the data that's already there alone if possible.
  8. php unknown file upload error

    Can anyone tell me what is wrong with this file that keeps saying that this file is invalid. it seems certain jpg files are invalid while others are not. yet they all meet the guidelines establish. ERROR:Upload: americanrobinbird.jpgType: image/pjpegSize: 12.8095703125 KbStored in: /chroot/tmp/phpfryeow Invalid file Invalid file Upload.php file <?php$query = "SELECT * FROM {$dbprefix}pages ORDER BY hn ASC";$result = mysql_query($query) or die(mysql_error());while($row = mysql_fetch_array($result)){extract($row);$options .= "<option value='$pn'>$hn</option>";}$query = "SELECT * FROM {$dbprefix}leftnav ORDER BY name ASC";$result = mysql_query($query) or die(mysql_error());while($row = mysql_fetch_array($result)){extract($row);$folderoptions .= "<option value='$link'>$name</option>";}echo "<form action='upload_file.php' method='post' enctype='multipart/form-data'> <label for='file'>Filename:</label> <input type='file' name='file' id='file' /><br /> <label for='file'>File Belonges To:</label> <select name='powner' class='form' />$options</select><br /> <label for='file'>File Folder:</label> <select name='folder' class='form' />$folderoptions</select><br /> <input type='submit' name='submit' value='Submit' /> </form>";?> Upload php file: <?php include("config.php");include("themes/$theme/header.php");?><?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } ?> <?php $allowedExts = array("jpg", "jpeg", "gif", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/jpg")) && ($_FILES["file"]["size"] < 20000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } } else { echo "Invalid file"; } ?> <?php $allowedExts = array("jpg", "jpeg", "gif", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/jpg")) && ($_FILES["file"]["size"] < 20000) && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("$folder/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { $name = $_FILES["file"]["name"]; $newname = "$folder/$name"; $query = "INSERT INTO {$dbprefix}pictures (plocation, powner) VALUES ('$newname', '$powner')"; $result = mysql_query($query) or die(mysql_error()); move_uploaded_file($_FILES["file"]["tmp_name"], "$folder/" . $_FILES["file"]["name"]); echo "Stored in: " . "$folder/" . $_FILES["file"]["name"]; echo "<script language=\"Javascript\">alert(\"Success!\");window.location.href = 'index.php?p=Upload';</script>"; } } } else { echo "Invalid file"; } ?> <?php include("themes/$theme/footer.php");?>
  9. Hello W3 People!. i have downloaded a picture upload class from here: verot.net.and working perfectly for my kind of coding in the schools. but i have never tried to make a (UPDATE) page of this kind of stuff where its deleting a picture and then uploading a new one dynamicly... and it does uploads the images correctly 100% and resizing them, and stuff like that... but it wont delete the older pictures, and update the Database Tables/Rows with the new image URL (witch are just the name of the the picture... im defining the path the diffrent places myself...) ideas?... here is my code [A LITTLE LONG...]: <?phpsession_start();ob_start();require_once("../db_conn.php");require_once("../login_checker_noroot.php");require_once("pic_mobel_uploader/class/class.upload.php");echo "<a href='index.php'>Tilbage Til Forsiden</a>"; if(!empty($_GET['m_id'])){$mid = $_GET['m_id'];$query = "SELECTdesigner.designer_navn,serie.serie_navn,produkter.design_aar,produkter.pris,produkter.vare_nr,produkter.information,produkter.produkt_navnFROMprodukter INNER JOIN serie ON produkter.FK_serie = serie.id INNER JOIN designer ON produkter.FK_designer = designer.d_id WHERE produkter.id = $mid";$result = mysql_query($query)or die(mysql_error());while($row = mysql_fetch_array($result,MYSQL_ASSOC)){ $p_navn = $row['produkt_navn']; $serie = $row['serie_navn']; $designer = $row['designer_navn']; $v_nr = $row['vare_nr']; $aar = $row['design_aar']; $pris = $row['pris']; $tekst = $row['information'];}//While Statement Ends... if(isset($_POST['Submit'])){$p_navnn = mysql_real_escape_string($_POST['p_navn']);$seriee = mysql_real_escape_string($_POST['serie']);$designerr = mysql_real_escape_string($_POST['designer']);$v_nrr = mysql_real_escape_string($_POST['v_nr']);$aarr = mysql_real_escape_string($_POST['aar']);$priss = mysql_real_escape_string($_POST['pris']);$tekstt = mysql_real_escape_string($_POST['tekst']);/*===================================*//*===================================*//*===================================*/if($_FILES['image'] >= 1)//bigger then one...{$pID = $_GET['m_id'];$queryImg = "SELECT * FROM image_url WHERE FK_produkt_id = " . $pID;$resultImg = mysql_query($queryImg)or die(mysql_error());while($rowImg = mysql_fetch_array($resultImg)){unlink('../../images/home_news_form/'.$rowImg['img_url']);unlink('../../images/mobel_details_big/'.$rowImg['img_url']);unlink('../../images/mobel_details_thumps_small/'.$rowImg['img_url']);unlink('../../images/mobel_liste_form/'.$rowImg['img_url']);}// as it is multiple uploads, we will parse the $_FILES array to reorganize it into $files$files = array();foreach ($_FILES['image'] as $k => $l){foreach ($l as $i => $v){ if(!array_key_exists($i, $files)) $files[$i] = array(); $files[$i][$k] = $v;}}// now we can loop through $files, and feed each element to the classforeach ($files as $file){if(!empty($_FILES['image']))//allways form name...{// we instanciate the class for each element of $file$handle = new Upload($file);//$file for the new (array images upload) to work...//$handle = new Upload($_FILES['image']); //OLD ONE... if ($handle->uploaded){ $handle->image_resize = true; $handle->image_ratio = true; $handle->image_x = 110; //Width in Pixels... $handle->image_y = 80; //Height in Pixels... $handle->Process('../../images/home_news_form/');}if ($handle->uploaded){ $handle->image_resize = true; $handle->image_ratio = true; $handle->image_x = 300; //Width in Pixels... $handle->image_y = 225; //Height in Pixels... $handle->Process('../../images/mobel_details_big/');}if ($handle->uploaded){ $handle->image_resize = true; $handle->image_ratio = true; $handle->image_x = 50; //Width in Pixels... $handle->image_y = 50; //Height in Pixels... $handle->Process('../../images/mobel_details_thumps_small/');}if ($handle->uploaded){ $handle->image_resize = true; $handle->image_ratio = true; $handle->image_x = 120; //Width in Pixels... $handle->image_y = 90; //Height in Pixels... $handle->Process('../../images/mobel_liste_form/');$image = $handle->file_dst_name;$produktID = $_GET['m_id']; mysql_query("UPDATE image_url SET img_url='$image', FK_produkt_id='$produktID' WHERE FK_produkt_id = ".$pID)or die(mysql_error());}}//end empty (FILES) statement...}//end foreach statement...}//if (FILES['image']) ends.../*===================================*//*===================================*//*===================================*/$query = "UPDATE produkter SET produkt_navn = '$p_navnn', FK_serie = '$seriee', FK_designer = '$designerr', vare_nr = '$v_nrr', design_aar = '$aarr', pris = '$priss', information = '$tekstt' WHERE id = $mid";mysql_query($query)or die(mysql_error());header("location:index.php");}//submit ends...}//IF !empty Statement Ends...else{ $p_navn = "NO ID SELECTED!..."; $serie = "NO ID SELECTED!..."; $designer = "NO ID SELECTED!..."; $v_nr = "NO ID SELECTED!..."; $aar = "NO ID SELECTED!..."; $pris = "NO ID SELECTED!..."; $tekst = "NO ID SELECTED!...";}?> <fieldset><legend>Redigering Af Vare</legend><form method="post" action="" enctype="multipart/form-data"><table border="1" align="center"><tr><td>Produkt Navn</td><td><input type="text" name="p_navn" value="<?php echo $p_navn; ?>" /></td></tr><tr><td>Serie</td><td><select name="serie"><option value="0">Vælg Serie</option><?php $m_query = "SELECT * FROM serie"; $m_result = mysql_query ($m_query)or die(mysql_error()); while ($m_row = mysql_fetch_array ($m_result)) { echo "<option value='" .$m_row['id']."'>" .$m_row['serie_navn']."</option>"; }?></select></td></tr><tr><td>Designer</td><td><select name="designer"><option value="0">Vælg Designer</option><?php$d_query = "SELECT * FROM designer";$d_result = mysql_query ($d_query)or die(mysql_error());while ($d_row = mysql_fetch_array ($d_result)){ echo "<option value='" .$d_row['d_id']."'>" .$d_row['designer_navn']."</option>";}?></select></td></tr><tr><td>Vare Nummer</td><td><input type="text" name="v_nr" value="<?php echo $v_nr; ?>" /></td></tr><tr><td>Aar</td><td><input type="text" name="aar" value="<?php echo $aar; ?>" /></td></tr><tr><td>Pris</td><td><input type="text" name="pris" value="<?php echo $pris; ?>" /></td></tr><?php$produkt_id = $_GET['m_id'];$query2 = "SELECT * FROM image_url WHERE FK_produkt_id = $produkt_id";$result2 = mysql_query($query2)or die(mysql_error());while($row2 = mysql_fetch_array($result2)){?><tr><td><?php echo "<img src='../../images/mobel_liste_form/".$row2['img_url']."'>"; ?></td><td><input type="file" name="image[]" id="image" /></td></tr><?php}?><tr><td>Teksten Her</td><td><textarea type="text" name="tekst" rows="10" cols="40" /><?php echo $tekst; ?></textarea></td></tr><tr><td> </td><td><input type="submit" name="Submit" value="Rediger Nu!" /></td></tr></table></form></fieldset> Hoping answers soon!... thanks (rootKID)... PS: any questions i need to answer, just ask... and ill try... [AND SORRY, BUT THE MOST OF THE CODING STYLE IS MADE IN DANISH, BUT I AM FROM DENMARK AFTERALL... I HAVE ALSO TRIED TO COMMENT OUT SOME (MOST OF IT) THE STUFF IN ENGLISH, HOPE IT HELPS...)
  10. All about PHP error-exception

    Know what you are dealing with : ERROR AND EXCEPTION WHY THIS? When we debug our code that means we find errors and fix them. so it is wise to know about them whom we are dealing with GETTING STARTED:I cant see anything. where to find error?Errors will not always be visible to you. you will see what your php.ini setting is set to show. There is some directive which handle this behaviour.http://in2.php.net/m...en/ini.list.php find the directives here"display_error""error_reporting""error_log" (for error logging)You can set it in php.ini directly (Recomended for development server where you have access to them) or you can set it it using ini_set(). (extra reference)see the principle of changing configuration of php.inihttp://in2.php.net/m...nfiguration.phphttp://in2.php.net/m...anges.modes.php IF YOU USE INI_SET() , MAKE SURE IT IS THE TOP MOST CODE OF YOUR CODE OR INCLUDE/REQUIRE TREEError types: Syntactical error Runtime error Logical error Syntactical error: behaviour:This error means you are not following the grammer of PHP. you had mistaken somewhere that it can not parse your code. as it does not parse your code, this errors show you prior to running the code. so when you see thi error your code is not being run.How to fix them?It is the most easier to fix errors. it happends usually when we make typo or forgot to close braces or put expression terminator (";") etc. though when you see the error you have not to search your code randomly, php will tell you where to look for. the showed error line is not always the origin of the error.it could be prior to that line.READ THIShttp://in3.php.net/m...l/en/tokens.phphere you can see the list of avialable parser tokens. so next time when you will see them it won't be hard for you to fin the reason.prevention is better than cureYou can avoid much of parse error if you write well readable code followinga any code standard. likehttp://pear.php.net/...g-standards.phphttp://framework.zen...g-standard.html and using decent IDE(eg netbeans) or text editor(eg notepad++)http://netbeans.orghttp://notepad-plus-plus.org/Runtime Error:behaviour:Your code is gramatically right. your code has been parsed and it has turned into opcode. now it is time for running it. in runtime there may be such case arises when your program does not do what you expect. like you are trying to get an index of an array which does not exist, etchow to fix them?This is the part we spent mostly to debug our code. There is different level of error Fatal error Warning Notice Fatal error: as it is saying, it is fatal. when such error arised it exits the scripts. YOU MUST FIX IT Warning: It level is lower than Fatal error. but is origin of unexpected behaviour even can lead to fatal error. YOU MUST FIX ITNotice: Low level error. does not harm much. but can lead to higher level error. so YOU SHOULD FIX ITLogical error:behaviour:your code grammer is correct it runs well but it has problem with the logic. It is the hardes part of debugging codes. it is problem with your logic somewhere in the code, which prevent you to outputting expected result.How to fix?PHP cant help you with that. you have to do it yourself. you can do that by whitebox testing or blackbox testing. there is unit test for php which can also help you in that. How would i know so many different error?Runtime errors are documented in every function and method in. you will find that on the manual. when you see any error with particular function just go to manual and see what exception/error it can throw in certain situation. SOMETHING MODERATED:How to handle error?Error handling principle is not same in production and development enviourment. You would not like to show your code faults publicaly. would you? in that case you will log them somewhere instead of showing them.http://in.php.net/ma...n.error-log.phpthere is another option, recruite a error handler which will handle all the error as YOU WANT.http://php.net/set_error_handler I want to throw my own error. how to?there is trigger_error() which will let you throw your own error. remember user level error has also the three types, like Fatal error,warning,notice.check this for available error constant http://in.php.net/ma...c.constants.php TOWARD MORE ADVANCE:EXception?! what is it?Exception is a state where your code is not doing what you expected and you will have chance to terminate the program gracefully. as opposed to Errors which is state, unrecoverable(though there is conceptually difference in exception of php and other language like java. 'notice' and 'warning' is some kind of error but they are recoverable, program does not exist when they occurs)http://in2.php.net/m....exceptions.php Why we will use exception? why php API uses exception (eg PDO)?PHP already documented exception in their manual. there is no need to write down again. the most imporatnt features of exception is, it is CATCHABLE and it can BUBBLE UP. Most of newer API include exception for its robustness. It also needs less code to write. it is readable. People should use exception for error handling instead of old error handling methods (like $error=array()). is there any callback handler same as for error handler?yes there is.http://in.php.net/manual/en/function.set-exception-handler.php. it will also give you freedom to handle exception customacllyWe can catch exception. can we catch error?Yes we can. EVEN WE CAN CATCH THE FATAL ERROR. we can use error handler to catch error and then throw ErrorException. http://in.php.net/ma...orexception.php look at the example. errorException is also exception which extends exception class. they are intenteded for handling error with behaviour of exception. Why would i want to catch and throw errors?The answer is same, for the advantages of exception. a error may be thrown at bottom of the call stack. with exception or errorException you can catch in any level of call stack and show a gracefull error rather than terminating the application (incase of fatal error).Imagine a nonexistant file "require"ing breaking up your page in the middle. Notes:this is the summary of the story of error-exception for geting the concept. If there is any question and query about these, can post it in separate topic. if it needs to add something more or for any correction or improvements can PM me.the links are provided, have the depth information about what it is being posted here and posted links are meant to be followed. There is no any substitute for php manual itself.
  11. Error Reporting

    Hi @ all, I've found an error at this forum. After I click the button "Alter Warning Level" I get an error report. I think, the easiest way is to hide the button if there is no warn status.
  12. Function to check for undefined?

    <form name="form" action="enter.php" method="post"> First Name: <input type="text" name="first" /><br /> Last Name: <input type="text" name="last" /><br /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c1" value="1" onclick="showSubmit()" /> <input type="checkbox" name="c3" value="1" onclick="showSubmit()" /> <!-- SUBMIT BUTTON HERE --> </form> If I only check the 1st and the 3rd checkbox and press the submit button, but in my enter.php, I made it check print out each of the inputs like so: <?php echo $_POST["first"];echo $_POST["last"];echo $_POST["c1"]; echo $_POST["c2"]; echo $_POST["c3"];?> I will get a warning/error claiming that the c2 is undefined. Is there a built in function that checks if something is undefined ? That way I can use a if and else statement: if is it undefined, it will print something, and if it is checked (defined), make it print something else.
  13. ok... i tried to enter my localhost again today to edit a little more on my projects... then i get this error: (PICTURE ATTACHED...) What the heck is that?... i mean... this is the line its talking about: (?>) witch are my PHP ending tag... someone?... Attached my config file also...
  14. GUI not launching

    I'm relatively new to java, and I've been working on a gui. Now when I run my code instead of opening the gui window I get this message in my console: java.lang.NumberFormatException: empty Stringat sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)at java.lang.Double.parseDouble(Unknown Source)at package.PartA.initialize(PartA.java:215)at package.PartA.<init>(PartA.java:58)at package.PartA$1.run(PartA.java:45)at java.awt.event.InvocationEvent.dispatch(Unknown Source)at java.awt.EventQueue.dispatchEvent(Unknown Source)at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)at java.awt.EventDispatchThread.pumpEvents(Unknown Source)at java.awt.EventDispatchThread.pumpEvents(Unknown Source)at java.awt.EventDispatchThread.run(Unknown Source) Also I've narrowed it down to it being something to do with these 3 lines: dFP = Double.parseDouble(jTextFieldFP.getText());dFAP =Double.parseDouble(jTextFAP.getText());dFDD =Double.parseDouble(jTextFDD.getText()); Please see if it's something simple I've just overlooked! Thank you!
  15. Php Text Show As ?

    So im having this problem with my php, when i get data from my SQL database example of this.gw-32?(f-bb>>&-p9yI@-)bSlj-wVyIW-(it will show it at website like this -load gw-32?(f-bb>>&-p9yI@-)bSlj-wVyIW-( So when it adds it goes like . Text is echoed to table. SQL type = TEXT. This is my charset on the page: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> Please any fix/help would be nice .
×