this is the error
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /var/www/IpSearch.php on line
Code: <?php
$srch = $_REQUEST["srch"];
if (empty($srch)) {
print <<<HERE
<form>
Type the Store location:
<input type = "text"
name = "srch">
<input type = "submit">
</form>
HERE;
} else {
$con = mysql_connect("localhost","root","icebird");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("IpPhoneDir", $con);
// Send a query to the server
if ($result = mysql_query($con, "call GetBranchBeg($srch)")) {
$um_rows = mysql_num_rows($result);
if($num_rows <= 0) {
echo "no match found";
}
print "<table border = 1>n";
//get row data as an associative array
While ($row = mysql_fetch_assoc($result)) {
print "<tr>n";
//look at each field
foreach ($row as $col=>$val){
print "<td>$val</td>n";
}//end foreach
print "</tr>nn";
}//end while-
print "</table>n";
} else {
trigger_error(mysql_error(),E_USER_WARNING); //this will display MySQL's error message
}
}
mysql_close($con)
?>
Code: DROP PROCEDURE `GetBranchBeg`//
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchBeg`(IN starts_with CHAR(15))
BEGIN
DECLARE tmp CHAR(15);
SET tmp = CONCAT(starts_with, '%');
SELECT IpPhoneNo, location FROM IpPhoneList WHERE location LIKE tmp OR location =starts_with;
END
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.i have this code Code: echo '<form action="archivedBookings.php" method="get">';
Php navigation
I have four buttons on a php page.If i click a button it will redirect to different php pages.How would i do that with php?
help removing unwanted graphic
How do I remove the small elongated rectangular shape between the "Latest post" and "Archives" section at http://www.simonlindgren.com ?The code surrounding this place
cURL Sending File as Post
This is a bit complicated, I'm just hoping someone else has run into this and knows how to do it a different way or make it work.When sending a file as part of form information included in a cURL
php slowing my site?
Hi all,I think that one of the reasons that my site doesn't work fast is that the code is very big.maybe in some cases there are un-optimal functions, I mean functions that I can improve them to get
extending tidy
I have problem with type-hinting and extending tidy. This code creates error:Code: class cMyTidy extends tidy{ public $tralala;}$oMyTidy = new cMyTidy();doSomething($oMyTidy);function
ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,Oracle 10g. Linux.I'm facing the below error while trying to import a dumpfileIMP-00003: ORACLE error 604 encounteredORA-00604: error occurred at recursive SQL level 1ORA-01655: unable to
sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the t-code for looking up items in our system. I noticed that on the main menu HELP->SETTINGS
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I have a method, that is supposed to open a file and write to the file, but I am having issues. Each
server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase connection failure