PHP - Checking If Data Exists Before Adding To Table?
Hi,
I'm making a website that uses data stored in SQL. One of my pages allows the user to enter a new product into a product table. I was wondering if somebody could help me with some validation or Query that will not allow the user to enter a product name that already exists in the table? Code: [Select] $nameNew = $_POST['new]; $nameID = $_POST['newID]; $namePrice = $_POST['newPrice]; INSERT INTO products VALUES ($nameNew, $newID, $newPrice) $describeQuery = "SELECT ID, Name, Price FROM Products"; $results = sqlsrv_query($conn, $describeQuery); echo '<table border="1" BORDERCOLOR=Black>'; echo '<tr><th bgcolor = "LightBlue">Name</th><th bgcolor = "LightBlue" >ID</th> <th bgcolor = "LightBlue" >Price</th></tr>'; while($row = sqlsrv_fetch_array($results, SQLSRV_FETCH_ASSOC)) { echo '<tr>'; echo '<td >' .$row['Name'].'</td>'; echo '<td>' .$row['ID'].'</td>'; echo '<td>' .$row['Price'].'</td>'; echo '</tr>'; } echo '</table>'; sqlsrv_close($conn); Thanks Similar TutorialsHi, Im trying to generate a random 4- digit code, and then check if it is allready in the database. My current code is below, but im not sure how to make it loop again, if the code exists. Also, im not sure if this is the best way of doing this, maybe someone could suggest something better... This is basicly what im trying to do: 1. hash the code 2. check if it exits in the DB 3. if it does, re-generate, and repeat 2., if not, return it function getUniqueHash() { global $mysql_server, $mysql_user, $mysql_password; $code = substr(md5(uniqid(rand(), true)), 0, 4); mysql_connect($mysql_server, $mysql_user, $mysql_password); // connect // $sql = "SELECT * FROM `$mysql_db`.`short` WHERE `short` = '$code'"; $result = mysql_query($sql); $results = mysql_numrows($result); if($results > 0) { //GO BACK AND RE-GENERATE CODE AND REPEAT CHECK } else { return $code; } mysql_close(); } PasteBin: Quote http://paste.tgxn.net/?s=9 If I do a mysql query from a database on a field that either has a number or is blank, how can I write php to check that. In other words, I am getting that value back into a variable called $isaresult and doing... Code: [Select] if ($isaresult !== '') { //value exists } else { //no value yet } It's that first line of code that doesn't seem to be working. Should I be using "null" or something instead? I'm not real experienced with checking if a value exists, so let me know the proper way to do it (since I assume there are multiple ways). Thanks! Hi folks, Working on something and I'm not sure how best to do it. It's a system whereby customers can login and see pdf files. Each customer has a unique reference number which is mirrored with a folder on the server, the folder name being the customer reference number. That's the first bit of checking. Then, within that customer folder there will be between 1 and X sub folders which are labelled by unique product reference numbers. Beyond that, each of the product reference folders will have a year folder with a folder for each month of the year going forward. Here's an example of the folder structu - Customer Number (e.g. 12345678) - Product Number (e.g. 456789) (could be more than one) - Year (e.g. 2011) (could be more than one) -Month (e.g. 01/02/03/04/05/06 etc) Essentially, I'm just unsure how to check if folders exist and display their contents if they do. Here's my code so far, which does the first part of checking to see if the product numbers exist, but not the folder checking (I've not activated the hyperlinks in this code yet). This doesn't go as far as years and months yet, just the product number: Code: [Select] $query = mysql_query("SELECT * FROM customers where id = '$id'"); while($rst = mysql_fetch_array($query)) { echo "$rst[company_name]"; } $query = mysql_query("SELECT * FROM sites where company_name = '$company'"); while($rst = mysql_fetch_array($query)) { echo "$rst[site]<br>"; if ($rst[product1] !== ""){ echo "- <a href='#'>$rst[product1]</a><br>"; } if ($rst[product1] == ""){ echo ""; } if ($rst[product2] !== ""){ echo "- <a href='#'>$rst[product2]</a><br>"; } if ($rst[product2] == ""){ echo ""; } if ($rst[product3] !== ""){ echo "- <a href='#'>$rst[product3]</a><br>"; } if ($rst[product3] == ""){ echo ""; } if ($rst[product4] !== ""){ echo "- <a href='#'>$rst[product4]</a><br>"; } if ($rst[product4] == ""){ echo ""; } if ($rst[product5] !== ""){ echo "- <a href='#'>$rst[product5]</a><br>"; } if ($rst[product5] == ""){ echo ""; } How can I check to see if a webpage exists with PHP. for example http://www.google.com/ would be true and http://fakeurl32939232.com/filepage.html = false What function/syntax would I have to use? This is something that has intrigued me, that has only recently surfaced when viewing the forum. Which of the following methods of authenticating that a user exists would be better/faster/ect? Example 1 - Fetching Row Data <?PHP $username = 'LoserVille'; $password = 'password'; $myQuery = mysql_query("SELECT account_id FROM user_accounts WHERE username = '$username' AND password = '$password'"); $myQuery = mysql_fetch_assoc($myQuery); if($myQuery) { /*### User Exists ###*/ } else { /*### User Does Not Exist ###*/ } ?> Example 2 - Fetching Number of Results <?PHP $username = 'LoserVille'; $password = 'password'; $myQuery = mysql_query("SELECT account_id FROM user_accounts WHERE username = '$username' AND password = '$password'"); $myQuery = mysql_num_rows($myQuery); if($myQuery >= 1) { /*### User Exists ###*/ } else { /*### User Does Not Exist ###*/ } ?> Just looking for some insight, not really a problem Regards, PaulRyan. Hi Guys, I'm using the following code to write emails to a .txt file: // Write the email to file $leadsFile = "leads/emails.txt"; $fh = fopen($leadsFile, 'a') or die ("can't open leads file!"); $writeData = "$conEM\r\n"; fwrite($fh, $writeData); fclose($fh); which works great, but i can't figure out how to NOT write an email to the .txt file if it's already on it, i'm not using a database for a change i'm stumped lol thanks for any help guys Graham I have come across couple of similar answers for my question in this form, but could not solve my exact problem. Therefore I am posting this he I have an xml file as shown below: <?xml version="1.0" encoding="ISO-8859-1"?> <document> <user> <user_id>0121</user_id> <name>Tim</name> <file>0121.file</file> </user> <user> <user_id>0178</user_id> <name>Henry</name> <file>0178.file</file> </user> <user> <user_id>0786</user_id> <name>Martin</name> <file>0786.file</file> </user> <user> <user_id>1239</user_id> <name>Jan</name> <file>1239.file</file> </user> </document> I ask the user to input his user_id and post this user_id and perform a check on the entire xml file to check whether the entered user_id exists in the xml file or not. If exists then I go further if not echo a error message. Can anybody pull me out of this? Thanks I have MySQL table with the following fields: user=>varchar product=>varchar Amount=>int Date=>date Note=>tinytext I can't add value to these field by the following php code: $date = date("Y.m.d"); $query = "INSERT INTO order VALUES ('farhad', 'Mango', '10', '$date', 'hello')"; $result = mysql_query($query) or die(mysql_error()); I receive the following warning: Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\inetpub\wwwroot\Okern\~order.php on line 10 Call Stack: 0.0047 325856 1. {main}() C:\inetpub\wwwroot\Okern\~order.php:0 0.0274 344912 2. date() C:\inetpub\wwwroot\Okern\~order.php:10 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order VALUES ('farhad', 'Mango', '10', '2011.04.17', 'hello')' at line 1 My error below returns (echos) that there is no data under the table sites to display. But, there is. Why is it doing this? class_l.php <?php class displaySites { function grabSites() { $query = mysql_query("SELECT title,description,votes,dates,comments,out,in FROM sites ORDER BY id DESC LIMIT 100"); if(mysql_num_rows($query) > 0) { while($fetch = mysql_fetch_assoc($query)) { echo " <div id='post-1' class='post'> <h2 class='title'><a href='#'>". $fetch['title'] ."</a></h2> <h3 class='date'>Submitted on ". $fetch['date'] ."</h3> <div class='entry'> <p>". nl2br(stripslashes($fetch['description'])) ."</p> </div> <p class='meta'><a href='#'>View</a></p> <div class='hr'> </div> </div> "; } } else { echo " <div id='post-1' class='post'> <h2 class='title'><a href='#'>Oh NOEZ!</a></h2> <h3 class='date'>". date("M-d-Y") ."</h3> <div class='entry'> <p>There are currently no sites to display!</p> </div> <p class='meta'>View</p> <div class='hr'> <hr /> </div> </div> "; } } } class register { function createAccount() { $username = mysql_real_escape_string($_POST['username']); $password = md5(sha1(sha1($_POST['password']))); $name = mysql_real_escape_string($_POST['title']); $description = mysql_real_escape_string($_POST['description']); if(isset($username) && isset($password) && isset($name) && isset($description)) { if(!$username || !$password || !$name || !$description) { echo '<table border="0"><form action="register.php" method="POST"> <tr><td>Username</td><td><input type="text" name="username" maxlength="20"></td></tr> <tr><td>Password</td><td><input type="text" name="password" maxlength="30"></td></tr> <tr><td>Site Name</td><td><input type="text" name="title" maxlength="25"></td></tr> <tr><td>Site Description</td><td><textarea cols="40" rows="18" name="description" maxlength="750"></textarea></td></tr> <tr><td>Finish!</td><td><input type="submit"></td></tr> </form></table>'; } else { $query = mysql_query("SELECT * FROM sites WHERE username = '$username' LIMIT 1"); if(mysql_num_rows($query) > 0) { echo "Sorry, an account with this username already exists."; } else { $date = date("M-d-Y"); $ip = $_SERVER['REMOTE_ADDR']; //create their account mysql_query("INSERT INTO sites VALUES (null, '$username', '$password', '$name', '$description', 0, 0, 0, '$date', '$ip', 0)"); echo "You have successfully registered your site on NovaTops! <a href='login.php'>Login</a>"; } } } else { echo "One or more of the variables are not set."; } } } class login { function verifyLogin() { $username = mysql_real_escape_string($_POST['username']); $password = md5(sha1(sha1($_POST['password']))); if(isset($username) && isset($password)) { if(!$username || !$password) { echo "<table><form action='login.php' method='POST'> <tr><td>Username</td><td><input type='text' name='username' maxlength='20'></td></tr> <tr><td>Password</td><td><input type='password' name='password' maxlength='30'></td></tr> <tr><td>Finished?</td><td><input type='submit'></td></tr> </form></table>"; } else { $query = mysql_query("SELECT * FROM sites WHERE username = '$username' AND password = '$password'LIMIT 1"); if(mysql_num_rows($query) > 0) { echo "Congratulations! You have successfully logged in! <a href='index.php'>Home</a>"; $_SESSION['user'] = $username; } else { echo "It seems you've typed in the wrong username and/or password. <a href='login.php'>Try Again</a>"; } } } else { echo "One or more of the variables aren't set."; } } } ?> index.php <?php include_once('includes/config.php'); include_once('class_l.php'); ?> <!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><?php echo $title; ?></title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <div class="top_text"><h1><a href="#"><?php echo $site_name; ?></a></h1> <h2><a href="#"><?php echo $slogan; ?></a></h2></div> <div id="content"> <div id="blog"> <div id="post-1" class="post"> <h2 class="title"><a href="#">Welcome to NovaTops!</a></h2> <h3 class="date">Created on April 06, 2011</h3> <div class="entry"> <p>Hello there! If your viewing this message right now, your on the awesome site called NovaTops! NovaTops allows you to register your site in our database, and then the site's script automatically starts to rank your site. The higher your rank, the more likely your site's going to get a ton of views!</p> </div> <div class="hr"> <hr /> </div> </div> <!-- end #post-1 --> <?php $displaySites = new displaySites(); $displaySites->grabSites(); ?> </div> <!-- end #blog --> <?php include_once('includes/navigation.php'); ?> <!-- end #sidebar --> <div style="clear: both; height: 1px;"></div> </div> <!-- end #content --> <div id="footer"> <p>Copyright © 2011. Design by <a href="http://www.flashtemplatesdesign.com/" title="Free Flash Templates">Free Flash Templates</a></p> <p><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a> | <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a></p> </div> </div> <!-- end #wrapper --> </body> </html> Hi, I want to make a query and check if data exists already on my is_availble table on calendar db tomake it unavailble . I have 16 checkboxs. I have this code for first one. And I did it for second one alse, although data dosen't exist on db, but it makes it also unvailble! Here you can see my php code: PHP Code: Code: [Select] <?php mysql_select_db("calendar", $con); $result2 = mysql_query("SELECT * FROM is_availble WHERE datetime=$v_datetime "); //---------------------------------- choeckbox 1(bookable time 1)------------------------\\ echo"<div class='box'> <div class='boxbut'>"; if($result2) { echo" Booked "; } else{ echo" <input type='radio' name='datetime' value='". $row['day1']." ".$row['time1']."'> <d>". $row['day1'] ,"</d><br/><t>". $row['time1'] ."</t>"; } echo"</div></div>"; //---------------------------------- choeckbox 2(bookable time 2)------------------------\\ echo"<div class='box'> <div class='boxbut'>"; if ($result2) { echo" Booked "; } else{ echo" <input type='radio' name='datetime' value='". $row['day1']." ".$row['time2']."'> <d>". $row['day1'] ,"</d><br/><t>". $row['time2'] ."</t>"; } echo"</div></div>"; Regards Hello. I want to check if an e-mail address is stored into a database. I've found this type of code: Code: [Select] function verifmail($email) { db_connect(); if (mysql_num_rows(mysql_query("SELECT email FROM users WHERE email='$email';"))) { return 1; } else { return 0; } } Is it correct ? Is there any other way? Hi, I just want to know how to check if a row/record already exists for a given table, but this code gives me message in browser: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in myTest.php This is the the snippet I am running: Code: [Select] <?php $connxn=mysql_connect("localhost","root"); $db=mysql_select_db("siliconvalley"); $toyNodePath="#document/siliconValleyHELLO"; $queryA=mysql_query("SElECT FROM pathexpress (path_express) WHERE path_express='$toyNodePath'");//make sure AT MOST ONE ROW EXISTS!! if(mysql_num_rows($queryA)==1) print "ALREADY IN table pathexpress!"; else { mysql_query("INSERT INTO pathexpress (path_express) VALUES ('$toyNodePath')"); print "ADDED $toyNodePath to table pathexpress!"; } ?> Please, any help is greatly appreciated! Hi, I am creating a temporary table. I need to check if the table already exists or not. If exists, I have to use the existing data else have to create a new temporary table. I can use 'Create If Not Exists'. How practical is this query? any issues with the performance? If the table exists it will be a huge data, I don't want to loose that data because recreating is an un-necessary load on the database. Hey, I am still learning PHP and all it's functions. So some of the coding may not be clean. But here is the script I made that I am having problems with: Code: [Select] <?php // Adjust MySQL connection settings... $username="newestfu_Dan"; $password = "camaro"; $hostname = "localhost"; $database = "newestfu_wowtrader"; // Connect to MySQL... $conn = mysql_connect($hostname, $username, $password) or die("Connecting to MySQL failed"); mysql_select_db($database, $conn) or die("Selecting MySQL database failed"); // Run our query, see if session username exists in session field... $sql="select username,email from user where username='{$_SESSION['user']}' limit 1"; $result=mysql_query($sql,$conn); // Parse our results into $data (as an associative array)... $data=mysql_fetch_assoc($result); // If one row was found in the result set, username exists... if (mysql_num_rows($result)==1) { print "Welcome, {$data['username']}, your current email on file is: {$data['email']}"; echo "<br />"; $query="select seller,id,title from listings"; $queryresult=mysql_query($query,$conn); $info=mysql_fetch_assoc($queryresult); if ( $info['seller'] == $data['username'] ) { echo "{$info['title']}"; } else { echo "You have no current auctions"; } // Otherwise... } else { print "Sorry, the username {$_SESSION['username']} was not found in our database..."; } ?> </body> </html> There are two queries going on. The first selects from the table "user" and gets the username depending on the user session and email. If one exists, it will go onto the next query to select from the table "listings" and gets seller, title, and id. It will then check if the username is equal to the seller. If it is, it will display the title. If not it displays otherwise. The problem is if the user has more than one title listed. But only 1 shows up. I'm guessing the line that has to change is Code: [Select] echo "{$info['title']}";But I'm not to sure on what to change it to. Thanks all for your help! I'm terrible at getting my question clear, but this is my last try. I got this which gets sent when clicking the button; echo"Auto/Prijs<br><br><select name='autos'>"; echo"<br><br>"; $sql = "SELECT `garage`.`id`, `car_id`, `schade`, `naam`, `prijs` FROM `garage` LEFT JOIN `cars` ON (`garage`.`car_id` = `cars`.`id`) WHERE `user_id`=".ID." ORDER BY `id` ASC LIMIT ".($page * 10).", 10"; $sql = mysql_query($sql) or die(mysql_error()); $i = 1; while($res = mysql_fetch_assoc($sql)){ echo" <option value='".$res['car_id']."'>".$res['naam']."</option><br> ";This is a dropdown, showing carnames instead of car_id's. Now, the car_id is not unique, but refers to a car. The 'id' in the 'garage' table IS unique. Am I able to like call the 'id' too, and on sending check if that ID is actually the sent 'car_id'? Because, you can tamper the sent car_id and simply change it. This happens on sending: if(isset($_POST['start'])){ $prijs = $_POST['prijs']; $carr = $_POST['autos']; $sql = mysql_query("SELECT `id` FROM `automarkt` WHERE `seller_id`=".ID." LIMIT 1") or die(mysql_error()); mysql_query("INSERT INTO `automarkt`(`seller_id`, `prijs`, `car_id`) VALUES (".ID.", ".$prijs.", ".$carr.")") or die(mysql_error());I'm out of idea's, and can't get clear enough on what I need to do. I need to check if the sent car_id is actually in the 'user''s garage. (Trying to do it by checking the unique entry 'id' in the 'garage' table. Say you have three tables like this...
STUDENTS (studentid, name)
CLASSES (studentid, classname)
GRADES (studentid, grade)
And not all students have grades yet. If you're doing a mysql query like below, is there anything you can add to the statement to check if a grade exists for each student? So that if while lopping through the results of the main query, I can easily do something with the students who don't yet have a grade yet (like maybe mark their names in red).
I can do this by putting a whole separate mysql query inside the looping of the main query, but that seems terribly inefficient to call the database again for EVERY student.
$sql = "SELECT * FROM students, classes, grades WHERE students.studentid = classes.studentid ORDER BY students.lastname"; $info= mysqli_query($connection, $sql); if (!$info) { die("Database query failed: " . mysqli_error()); } else { //code }Thanks! Greg Hi there, I was thinking of using this following check system to see if a user has entered a good valid value for a categories selection, but it is just is_numeric, here's my line of single code for this: Code: [Select] if(!array_key_exists('category', $_GET) || trim(is_numeric($_GET['category'])) == '') Is there anything better that I can be using than is_numeric()? I mean this would allow 2.22 which for the categories selection, would not be valid, I will only be allowing integer values, I mean it would potentially come up with no category selected but that wouldn't be very good would it? It could be applied to a blog I am doing aswell, any guidance on such an improvement on this function would very much be appreciated, Jeremy. Friends, I want to check a site if there is any data avaliable for a given Domain Name.... For example Quote http://www.keywordspy.com/research/search.aspx?tab=domain-organic&market=uk&q=abc.co.uk In this URl the Domain is the "&q=" POST Parameter which is: abc.co.uk In the Output, Observe the Columns Keyword, Position, Volume etc.... So for any Domain we want to check if there is one or more keyword returned. Here is the Example of a Domain for which there is no Data: Quote http://www.keywordspy.com/research/search.aspx?tab=domain-organic&market=uk&q=notfoundforme.co.uk As you Observe there is no data in Keyword, Position or Volume Columns for this Domain (i.e. notfoundforme.co.uk) All i want is to Echo All the Keywords, their Position and Volumes for any domain for which data is avaliable. Code: Here is the Code i have which scrapes the Whole data with Curl, but i am not able to make getkwspydata function work to get the Keyword, Position or Volume data for the domain, i know some regex and preg_match needs to be done but its too technical for me, may someone help me with this? <?php function getkwspydata($host) { $request = "http://www.google.com/search?q=" . urlencode("site:" . $host) . "&hl=en"; $request = "http://www.keywordspy.com/research/search.aspx?tab=domain-organic&market=uk&q=". urldecode($host); $data = getPageData($request); // preg_match('/<div id=resultStats>(About )?([\d,]+) result/si', $data, $p); // $value = ($p[2]) ? $p[2] : "n/a"; // $string = "<a href=\"" . $request . "\">" . $value . "</a>"; //return $string; print_r($data); } function getDomainName($host) { $hostparts = explode('.', $host); // split host name to parts $num = count($hostparts); // get parts number if(preg_match('/^(ac|arpa|biz|co|com|edu|gov|info|int|me|mil|mobi|museum|name|net|org|pp|tv)$/i', $hostparts[$num-2])) { // for ccTLDs like .co.uk etc. $domain = $hostparts[$num-3] . '.' . $hostparts[$num-2] . '.' . $hostparts[$num-1]; } else { $domain = $hostparts[$num-2] . '.' . $hostparts[$num-1]; } return $domain; } function getPageData($url) { if(function_exists('curl_init')) { $ch = curl_init($url); // initialize curl with given url curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // add useragent curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // write the response to a variable if((ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off')) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // follow redirects if any } curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); // max. seconds to execute curl_setopt($ch, CURLOPT_FAILONERROR, 1); // stop when it encounters an error return @curl_exec($ch); } else { return @file_get_contents($url); } } $sitehost = ($_POST['sitehost']) ? $_POST['sitehost'] : $_SERVER['HTTP_HOST']; $sitedomain = getDomainName($sitehost); ?> <html> <head> <title>SEO Report for <?=$sitedomain;?></title> </head> <body> <form method="post" action="<?$_SERVER['PHP_SELF'];?>"> <p><b>Domain/Host Name:</b> <input type="text" name="sitehost" size='30' maxlength='50' value="<?=$sitehost;?>"> <input type="submit" value="Grab Details"></p> </form> <ul> <li>Google indexed pages: <?=getkwspydata($sitehost);?></li> </ul> </body> </html> Cheers Natasha T. Hello,
I am trying to check whether the values in rows are equal or same?
I have two tables orders and line_items. I will store more than 1 line items in line_items table with the same order_id getting from orders table. In line items if i have 3 line items for same order_id, when each line items gets dispatched i will set the status to 'Dispatched' in line_items table. When all the 3 becomes 'Dispatched', i will update the order status as 'Completed' in orders table.
Now i am not getting how to check whether all the 3 line items status id 'Dispatched'.
I tried doing like this
$q1 = "select orders.order_id, orders.item_status as istatus, orders.status as ostatus, orders.authorise, line_items.order_id, line_items.status as bstatus, COUNT(line_items.id) as bid from orders inner join line_items on orders.order_id=line_items.order_id where line_items.order_id=".$id." AND line_items.id<>'Dispatched'"; $q2 = mysql_query($q1); while($q3 = mysql_fetch_array($q2)) { echo $q3['bstatus']; if($q3['bstatus']==''); { echo "HELLLOOOO"; } }But its not working. It goes into if loop even if a single value is 'Dispatched' Please help me. hi... i have a table ... i add and remove data in the table...when i add new record , information add to center of the table ! whats problem? i want add data in first of table. please guide me.thanks
|