I am recieving a notice(s) multiple times when running a file: Notice: Undefined index: Telephone in C:\xampp\htdocs\demo\nest_Demo_thrasher.php on line 111 Notice: Undefined index: eMail in C:\xampp\htdocs\demo\nest_Demo_thrasher.php on line 112 I have researched this and the ways to solve it. Most ways involve isset it seems, but none of my code in this example use Get. Note: This code comes from a class I am taking on-line. I did not write the code. I have noticed during the class that the instructor has presented us files to download that contain obvious errors. When he runs this particular file he gets no …

Member Avatar
Member Avatar
+0 forum 7

I have connected to database link below $db_host = "localhost"; $db_username = "root"; $db_password = ""; $db_name = "db"; $sql = new mysqli($db_host,$db_username,$db_password,$db_name); And I refered to it on a different page like: function user_exists($username){ $username = sanitize($username); $query_user = $sql->query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username'"); return (mysqli_result($query_run,0)==1)? true:false; } But I still receive: undefined variable sql, What am I missing?

Member Avatar
Member Avatar
+0 forum 4

I am trying to insert data on my database, but when i do, it says UNDEFINED INDEX HTML code here <form action="insert.php" autocomplete="on"> <h1> Sign up </h1> <p> <label for="username">Your username</label> <input id="username" name="username" type="text" /> </p> <p> <label for="emails" > Your email</label> <input id="emails" name="emails" type="email" /> </p> <p> <label for="password" >Your password </label> <input id="password" name="password" type="password" /> </p> <p> <label for="passwordcon" >Please confirm your password </label> <input id="passwordcon" name="passwordcon" type="password" /> </p> <p class="signin button"> <input type="submit" value="Sign up"/> </p> </form> PHP Code Here <?php $con=mysqli_connect("localhost","root","","database"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . …

Member Avatar
Member Avatar
+0 forum 2

Hey guys, here I am starting my journey into javascript, when this stupid bug is annoying me. Following is my piece of code: <html> <head> <title> Using 'this' in Javascript.</title> </head> <body> <script type="text/javascript"> var name={ firstName:"Foo", lastName:"Bar", showName:function(){ console.log(this.firstName +" "+this.lastName); } }; name.showName(); alert(name.lastName); </script> </body> </html> Problems: 1) I am getting following error for `name.showName();' `Uncaught TypeError: undefined is not a function` 2) Undefined popup for `alert(name.lastName)` As far as my knowledge takes me I have already defined object property and method before using. Where do you guys think is the bug ? Regards

Member Avatar
Member Avatar
+0 forum 7

Hey everybody, As of this moment i'm trying to work out how to approach a state design. I've come across Source Makers' site [http://sourcemaking.com/design_patterns/state/cpp/1](http://sourcemaking.com/design_patterns/state/cpp/1) and am testing out the example. The program works fine when it's all in 1 file, although i had to change some stuff in main, but when i separate the program into headers and .cpp errors would occur. This is what i have at the moment. There's quite a lot of errors but i think it all has to do with the "base class not being defined". The majority of errors are defined as... `error C2504: …

Member Avatar
Member Avatar
+0 forum 5

Hi everyone, I been looking around how to solve this problem but I am stuck. I asked my professor and he is stuck. Can someone look at the code and see why I am getting this error? Thank you [Click Here](https://onedrive.live.com/embed?cid=C2E1FEBBE16A4502&resid=C2E1FEBBE16A4502%211354&authkey=ANpXFPvY6ss3LrY) Here is my HTML <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Magic Word - Sample</title> <script src="magicWord.js"></script> </head> <body> <div> <h2 align="center">WELCOME TO MAGIC WORD!</h2> <h3>Please enter your guess on the space below:</h3> <div> <input type="text" id="guestGuess" /> <input type="submit" id="submitButton" onclick="javascript:enteredGuess();" /> </div> </div> <div> <h3>Your guesses so far are: </h3> <div id="userGuesses"></div> <div>You have guessed: <span id="userAttempts"></span> times</div> </div> …

Member Avatar
Member Avatar
+0 forum 4

hey guys so im getting > Notice: Undefined index: spouse-salutations in D:\Xampp\htdocs\EMS2\add_contact_process.php on line 18 > Notice: Undefined index: spouse-state in D:\Xampp\htdocs\EMS2\add_contact_process.php on line 24uoted Text Here > Notice: Undefined index: child-salutations in D:\Xampp\htdocs\EMS2\add_contact_process.php on line 30 > Notice: Undefined index: child-state in D:\Xampp\htdocs\EMS2\add_contact_process.php on line 36 and its really frustrating because $spousesalutations = mysql_real_escape_string($_POST['spouse-salutations']); $spousestate = mysql_real_escape_string($_POST['spouse-state']); $childsalutations = mysql_real_escape_string($_POST['child-salutations']); $childstate = mysql_real_escape_string($_POST['child-state']); I think it has something to do with how my page works. my page is a contact form page that has all the general : name email etc and two radio buttons one with label "Spouse …

Member Avatar
Member Avatar
+0 forum 2

I keep getting loads of linker errors that probably have something to do with virtual-functions/definitions and/or static class members... I've seen several relevant posts but none of the solutions suggested work, can you see wht the problem is here? My projects consists of 3 files: BALLS.H #include <iostream> using namespace std; class Ball{ //Abstract Class!! protected: //no Balls will be constructed int durability; bool hidden; public: Ball(int dur=0) :durability(dur), hidden(false){} virtual void hit(){} virtual void rest()=0; virtual int get_state() {} }; class Basket : public Ball { public: Basket(int L1) :Ball(L1) { cout<<"New basketball!"<<endl; count++; } void rest(){} int get_state(); …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I've bought the book "Objective-C Programming - The Big Nerd Ranch Guide" and I'm running through the beginning chapters which just regard C. I'm doing this on my laptop running linux as I don't have a Mac (yet). I'm having trouble with this code: #import <stdio.h> #include <readline/readline.h> #include <readline/history.h> int main(int argc, char * argv[]) { printf("Who is cool? "); const char *name = readline(NULL); printf("%s is cool!\n\n", name); return 0; } I'm compiling (attempting to) using this command: gcc -lreadline -o Coolness main.c // "Coolness" being the name of the program in the book I'm getting …

Member Avatar
Member Avatar
+0 forum 6

`final PerspectiveCamera camera = new PerspectiveCamera(true);` The constructor PerspectiveCamera(boolean) is undefined. http://download.java.net/jdk8/jfxdocs/javafx/scene/PerspectiveCamera.html Clearly says that it can accept a boolean for "verticalFieldOfView" Why is Java giving me this error?

Member Avatar
Member Avatar
+0 forum 3

The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed to like this. c=(--a); c=c+(--a); Then it works fine. Someone please point out where is loophole in my knowledge. Thanx.

Member Avatar
Member Avatar
+0 forum 6

Hi, This error must be silly but i just can't seem to get over it for a day now. The following code tries to fill up an image array, and then "do something" with it. The problem is that I get an undefined error for the use of icons[i].src the next line (line 24) after a value was assigned to it. Can anyone look and see what I'm doing wrong? Thanks! <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Web Project</title> <script> //Parameters ("constants") var iconsNumber = 13; //The number of available icons (letters+other) that need to be …

Member Avatar
Member Avatar
+0 forum 2

<table width="700" border="1" bordercolor="#FFFFFF" bgcolor="#000000"> <tr bgcolor="#FFFF66"> <td height="28" colspan="3" align="center"><strong> My Blood Pressure Data</strong></td> </tr> <tr bgcolor="#FFFFFF"> <td>Date:</td> <td>:</td> <td><?php echo $row["date"];?></td> </tr> <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <td width="170">Select a time(12Hours)</td> <td width="3">:</td> <td><?php echo $row["time"]; ?></td> </tr> <tr bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <td>Systolic mm Hg</td> <td>:</td> <td><?php echo $row["systolic"]; ?> </td> </tr> <tr bgcolor="#FFFFFF"> <td>Diastolic mm Hg</td> <td>:</td> <td><?php echo $row["diastolic"]; ?> </td> </tr> <tr bgcolor="#FFFFFF"> <td>Pulse</td> <td>:</td> <td><?php echo $row["pulse"]; ?></td> </tr> <?php $systolic= "systolic"; $diastolic= "diastolic"; $select=@mysql_query("SELECT systolic, diastolic FROM blood_record"); $info=@mysql_fetch_array($select, $conn); if($info) { if($systolic < 120 AND $diastolic < 80) { $level = "NORMAL"; } else if($systolic …

Member Avatar
Member Avatar
+0 forum 1

Hi All having a problem with the following statement " Notice: Undefined index: Username in C:\wamp\www\david\remoteaccess\index.php on line 6". I have tried defining Username in a number of ways, but I seem to missing something. Any help would be great Thanks in advance Thanks <?php session_start(); include("includes/utilities.php"); include("includes/functions.php"); $username = $_POST['Username']; var_dump($_POST); $Errors = ""; $_SESSION['LoggedIn'] = false; $_SESSION['UserID'] = ""; $_SESSION['UserAdmin'] = false; $_SESSION['Username'] = $username; if (isset($_POST["Username"])) { SQLUser(); }else{ loginForm(); } ?>

Member Avatar
Member Avatar
+0 forum 8

Hi all, I am working on the following code and I am having a problem with defined variables. On the output on the Submitted and Username Inputs as being undefined. I have added $username = (isset($_POST['Username'])) ? $_POST['Username'] : ""; at the start of the function but not suppressed. Thanks for your help David index.php <?php session_start(); ob_start(); include_once ("includes/settings.php"); include("includes/functions/functions.php"); //include_once ("includes/optional.php"); var_dump($_POST); $Errors = ""; $_SESSION['LoggedIn'] = false; $_SESSION['UserID'] = ""; $_SESSION['UserAdmin'] = false; if ($_POST['Submitted'] == "true") { // process submitted data $userSQL = $Database->Execute("SELECT UserID, UserFullname, UserEmail, UserLastPassword FROM Users WHERE UserName = '" . mysql_real_escape_string($Text->ValidSQLString($_POST['Username'])) …

Member Avatar
Member Avatar
+0 forum 8

here is my function.when i click on the readp button,it will show undefined variable,but still can show out the string in txt file. <?php if(isset($_GET['readp'])){ readinfo($fname,$lname,$phone,$email,$mname,$gender,$city,$country,$fax,$exp); } ?> <?php function readinfo($fname,$lname,$phone,$email,$mname,$gender,$city,$country,$fax,$exp){ $info=file('log.txt'); for($i=count($info)-1;$i>=0;--$i){ echo cleanOutputData($info[$i])."<br>"; } } ?>

Member Avatar
Member Avatar
+0 forum 8

/* `I have some dynamic checkboxes and corresponding textboxes. When a user ticks a checkbox and enters data into the corresponding textbox and submits, the value of the checkbox and textbox should be inserted into the database. I can insert the checkbox values perfectly, but the textbox values have issues. How I can do it ? Below is the code.. I am not able to print checkbox's textbox value` */ if(isset($_POST['submit'])) { $email=array(); // Checkbox array $different_kvs=array(); // textbox array foreach($_POST['contactid'] as $i => $contenti) $email[$i]=$contenti; $elements = count($_POST['kv']); if($elements > 0) { for($i = 0; $i <= $elements; $i++) …

Member Avatar
Member Avatar
+0 forum 14

Hi Please see code below, when I query my db I am getting an unefined variable issue, any ideas? I am quiet new to PHP so please help. mysql_connect("localhost","root",""); mysql_select_db("db"); $id = intval($_GET['id']); $res = "SELECT * FROM table WHERE id=$id"; echo "<table>"; echo "<tr>"; echo "<td>"; echo "<h4>".$row['item']."</h4>"; echo "</td>"; echo "</tr>"; echo "<td>";?> <img src ="<?php echo $row['image']; ?>" height ="100" width ="100"> <?php echo "</td>"; echo "</tr>"; echo "<td>"; echo $row['description']; echo "</td>"; echo "</tr>"; echo "<td>"; echo $row['price']; echo "</td>"; echo "</tr>"; echo"</table>"; ?>

Member Avatar
Member Avatar
+0 forum 3

hello guys, i have 2 tables - tblproduct and tblretprod. prod_id is common in both. i am retrieving records from the tables to display with edit and delete options beside each record displayed. i created an update.php and updprod.php (for edit). update.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=utf-8" /> <title>Update/Delete Product</title> <?php include_once("db_connect.php"); $result=mysql_query("SELECT a.prod_name, a.prod_brand, b.prod_price FROM tblproduct a, tblretprod b where a.prod_id = b.prod_id"); ?> </head> <body> <?php echo "<table width='80%' border=0>"; echo "<tr bgcolor='#CCCCCC'>"; echo "<td>Product</td>"; echo "<td>Brand</td>"; echo "<td>Price</td>"; echo "<td>Action</td>"; echo "</tr>"; while($res=mysql_fetch_array($result)){ echo "<tr>"; echo …

Member Avatar
Member Avatar
+0 forum 7

<?php if(isset($_POST['submit'])) { require_once 'connect.php'; $query=mysql_query("SELECT 'admin_name.admin_name','admin_name.admin_lastname','admin_name.admin_creattime', 'admin_detail.admin_pass','admin_detail.admin_phone','admin_detail.admin_email','admin_detail.admin_gender' FROM admin_name,admin_detail "); if(!$query) { die('nt good fail to select'.mysql_error()); } else{ while($row=mysql_fetch_row($query)): $name = $row['admin_name']; $last = $row['admin_lastname']; $acctime = $row['admin_creattime']; $pass = $row['admin_pass']; $phone = $row['admin_phone']; $mail = $row['admin_email']; $gen = $row['admin_gender']; echo $name." ".$last." ".$acctime." ".$pass." ".$phone." ".$mail." ".$gen; endwhile ; } } echo "Admin is Created Successfully"; ?> <html> <head> <title>adminpanal</title> </head> <body> <form method="post" action="admindetail.php"> <input type="hidden" name="submit"> <input type="submit" name="submit" value="click here">to see detail of your's </form> </body> </html>

Member Avatar
Member Avatar
+0 forum 1

How to solve the undefined index error? i have tried to make hidden field but not working also.. <?php if($nume==0) { echo "You currently have no item to show"; } else if(isset($_GET['msg'])) { $msg = $_GET['msg']; if($msg!='') { echo '<table border="1"> <tr> <td><font color="red">'.$msg.'</font></td> </tr> </table>'; } } ?></font></strong></p> <table width="680px" cellspacing="0" cellpadding="5"> <tr bgcolor="#ddd"> <th width="220" align="left">Date </th> <th width="200" align="left">Outlet </th> <th width="130" align="left">Status</th> <th width="70"> </th> </tr> <?php $start=(isset($_GET['start'])) ? (int)$_GET['start']:0; if(strlen($start) > 0 and !is_numeric($start)) { echo "Data Error"; exit; } $eu = ($start - 0); $limit = 5; $this1 = $eu + $limit; $back = …

Member Avatar
Member Avatar
+0 forum 19

I'm writing classes for widgets on a ui. While planning what I would do, I realized majority of the of the classes would look very similar. What I decided to do was to use a macro that takes a few parameters to define the similar parts of the class bodies. After cleaning a few code errors, I compiled and got a bunch of linker errors. I cleaned and rebuilt a few times with the same result All of the errors say: error: undefined reference to vtable for 'every class using the macro'. I have an idea the errors are related …

Member Avatar
Member Avatar
+0 forum 4

I want to have this table and user will be able t delete row of data if they wish to with the checkbox. But the errors i don't know how to solve: *Notice: Undefined index: itemcode in /home/lh026/public_html/pro1/ostock.php on line 153* *Notice: Undefined index: saiz in /home/lh026/public_html/pro1/ostock.php on line 154* *Notice: Undefined index: quantity in /home/lh026/public_html/pro1/ostock.php on line 155* *1 Records deleted Successfully.* The data is not deleted in database but message show *1 Records deleted Successfully.*..Please help. <form name="form1" method="POST" action=""> <div id="content2" class="float_r"> <h1> </h1> <h4><a href="addstock.php"><img src= "img/add.png" /><strong> Add Items</strong></a></h4> <p><strong><font color="red"> <?php if($nume==0) { echo "You …

Member Avatar
Member Avatar
+0 forum 12

I am new to php, just made a simple calculator. when I don't select the radio buttons; a notice come up. Notice: Undefined index: r in E:\MY LOCAL SERVER\htdocs\php practise\calculator-form-advanced.php on line 59 Also I want show results in this input section <p> <label for="result">Result</label> <input type="text" value="" /> </p> --- <!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=utf-8" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action=""> <p> <label for="num1">Number 1</label> <input type="text" name="num1" id="num1" /> </p> <p> <label for="num2">Number 2</label> <input type="text" name="num2" id="num2" /> </p> <p> <input type="radio" name="r" …

Member Avatar
Member Avatar
+0 forum 1

Hello, When i compile i get theses undefiend reference to extern lobal variable. In my code, i try to do an file that define it and extern it on SystemeBataille.cpp call th definitor on main.cpp but same error. If i place my extern on an specific function exemple SystemeBataille::placeExternHere i get an not declared error. First question: Do my file for defined variables is useful and do something wrong? Second Question: Do as a beginner i'm better to place all in same file with one and only header with variables as protected? and Thirth Question: There an way for define …

Member Avatar
Member Avatar
+0 forum 7

I am following this tutorial http://www.css-resources.com/code-for-php-photo-gallery.html to create php photo gallery but i get errors undefined index photos, categories and cy when i run this code, it gets the category names in a textarea and adds them in the db, in the output also says no database selected but i have selected it in the config.php. Please help!! <body onload='fix()'> <?php include_once ("config.php"); $pattern1 = '/[^a-zA-Z0-9\\_\\,]/i'; $pattern2 = '/[^a-zA-Z0-9\\.\\,\\-\\_]/i'; $replacement = ''; $P=$_POST['photo']; $C=$_POST['category']; $CY=$_POST['cy']; $P=strip_tags($P); $C=strip_tags($C); $P=preg_replace($pattern2, $replacement, $P); $C=preg_replace($pattern1, $replacement, $C); $C=mysql_real_escape_string($C); $P=mysql_real_escape_string($P); if (strlen($P)<5 && strlen($C)<5) { unset($P);unset($C); echo "<div id='form' class='form'> <form name='myform' method='post' action='cms-write-photo-gallery.php' onsubmit='bye()'> …

Member Avatar
Member Avatar
+1 forum 3

<?php $filename = $_FILES['file']['name']; $tempname = $_FILES['file']['tmp_name']; if(isset($filename)){ //echo $filename; $directory = 'E:/php_uploads/'; move_uploaded_file($tempname,$directory.$filename); echo 'Done'; } else{ echo 'No file selected'; } ?> <form method="POST" action= "fileupload.php" enctype = "multipart/form-data"> <input type="file" name="file"><br/><br/> <input type="submit" value="Submit"> </form> The enctype is correct.The element names correspond to those in the php code.So what is wrong which leads to it showing Notice: Undefined index : file in blah blah blah...?

Member Avatar
Member Avatar
+0 forum 2

Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include -lblob in the build which I have already done without success. I'm using cvblobslib with openCV, and as per their instructions I've compiled their code to create libblob.a. I've copied this into /usr/local/lib and executed 'sudo ldconfig'. This should have registered the library. Here are the relevent snippets from the …

Member Avatar
Member Avatar
+0 forum 1

this my script.When i do this,it works fine ` $query = "select * FROM aboutusx order by title desc"; ` but when i do this `$query = "select * FROM aboutusx WHERE myaccountid='$myid' order by title desc";` then i get this `Notice: Undefined variable: start in D:\xampp\htdocs\kwa\admin\userindex\inc\ps_pagination.php on line 176` i need this piece of code `myaccountid='$myid'` in order to select data input by user with that id .Am building a cms that require user specific data shown to specific users with specific user id full code below $count_num_str='50'; $query = "select * FROM aboutusx WHERE myaccountid='$myid' order by title …

Member Avatar
Member Avatar
+0 forum 3

Hi can someone help me out, please. I have been using the same file upload script on three websites that I manage, with great success. But recently I have encountered some errors when accessing the file upload form on my locahost server on my own computer server. This has never happened before. The following errors appear: **Notice:** Undefined index: uploaded in C:\xampp\htdocs\****\********\*****\upload_file.php on line 16 **Notice:** Undefined variable: uploaded_size in C:\xampp\htdocs\****\********\*****\upload_file.php on line 20 **Notice:** Undefined variable: uploaded_type in C:\xampp\htdocs\****\********\*****\upload_file.php on line 25 **Notice:** Undefined index: uploaded in C:\xampp\htdocs\****\********\*****\upload_file.php on line 35 These errors do not appear on the live …

Member Avatar
Member Avatar
+0 forum 3

The End.