PHP - Error With Mysql Integration.
i get
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\AtomicPool\s.php on line 93 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\AtomicPool\s.php on line 95 when i use this code: <?php $dbhost = 'xxxx'; $dbname = 'xxxx'; $dbuser = 'xxx'; $dbpass = 'xxxxxx'; $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); if (isset($_GET['cat'])){ $cat = $_GET['cat']; $get_cat = mysql_query("SELECT * FROM categories WHERE Short Name = '$cat'"); $get_cat_rows = mysql_num_rows($get_cat); --This is Row 93 if ($get_cat_rows=1){ while ($fetch = mysql_fetch_assoc($get_cat)){ --This is Row 95 $categoryyyy = $fetch['Name']; $categ = "".$categoryyyy." Games"; } } } else echo "Looks like someone has been playing with the URL bar..."; ?> Similar TutorialsOkay so i have a flash game website. I want it so that i can list all the games in a category onto one page. So, php selects the items with the category with mysql(for example 'a for arcade' http://url.com/select.php?cat=a) and then lists every game's name and a link to the url (by grabbing the id of the game and providing a link (http://url.com/play.php?id=1) This is the code i have so far.. <?php $con = mysqli_connect('localhost', 'root', 'root', 'games')or die(mysqli_error($con)); if(isset($_GET['cat'])){ $query_var = $_GET['type']; // force it to be an integer $query=" SELECT * FROM games WHERE category = '$query_var'"; $result = mysqli_query($con, $query)or die(mysqli_error($con)); } } ?> <html> <head> <title> Test </title> </head> <body> ? </body> </html> I have been pulling my hair out for the lasy 3 hours i am trying to update a MySql table but i cant get it too work, i just keep getting MySql error #1064 - You have an error in your SQL syntax; if i just update 1 field it works fine but if i try to update more than 1 field it dosent work, Help Please! <?php $root = $_SERVER['DOCUMENT_ROOT']; require("$root/include/mysqldb.php"); require("$root/include/incpost.php"); $con = mysql_connect("$dbhost","$dbuser","$dbpass"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("$dbame", $con); mysql_query("UPDATE Reg_Profile_p SET build='$build' col='$col' size='$size' WHERE uin = '$uinco'"); ?> does anyone know who to resolve this issue of importing a CSV file from excel into sql? I get this error when I do. LOAD DATA LOCAL INFILE '/tmp/phpq2aAbU' INTO TABLE `Events` FIELDS TERMINATED BY ',' ENCLOSED BY '\\"' ESCAPED BY '\\\\' LINES TERMINATED BY '\r\n' I currently have a project undergoing, however i need help integrating two scripts: Login script & Comment Script The checking if logged in part is this - Code: [Select] if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) { header("location: access-denied.php"); exit(); } and i want it so that i can check if the user is logged in the comment script will use there first name from my mysql table of members. The field name in the table for first name is 'firstname' and my comment section script looks like this Code: [Select] echo "<div class=\"commentbody\" id=\"$commentrow[0]\">\n <p class=\"postedby\">Posted by "; if($commentrow[3]){ echo "<a href=\"$commentrow[3]\">$commentrow[2]</a> "; } else { echo "$commentrow[2] "; } echo "</p> \n <p>$commentbb</p>\n\n</div>"; } echo "</div>"; } Please someone help me, its driving me crazy. Any more info needed just ask many thanks in advance!! Okay, I run a website; I wrote it from scratch, it's own database. With this website, I also run a news section (Run by wordpress), a wiki (Run by MediaWiki), A chat system (X7Chat), and a Live Help system (Mibew Messenger). I am looking to integrate all four of these systems to run off the same login as my main website. I would like it so that when the user logs in to the main site, it automatically logs in and sets the cookies for the other 4 systems. I also want it so when a user registers, it automatically registers them on the other 4 systems. I have achieved this with the chat system. I duplicated the Cookies and I have it so that if a user logs in to the main site, it sets the cookies for the chat, and when a user registers, or changes their password or email, it updates it on the chat table. But, I am finding it quite more difficult for the Wiki, Wordpress, and the Live Help system. The cookies were easy to duplicate for the chat system, and inserting the rows was fairly simple for the chat system, but it is quite a bit more complicated with the other systems. I am hoping someone here has done this before and could help me out on this one, because I am clueless. Thanks in advance for all that help. Hey All, I am using a Curl script to call item details from an API and then updating mysql with the results. But the API is limited to 100 requests per 60 seconds. So I am currently just using: $page = $_GET["page"]; $next_page = ++$page; echo "<meta http-equiv='refresh' content='60;url=?page=".$next_page."'>"; This runs until the results from the API runs out, then resets the page number to 1 and loops through again. My question is, will this would the same with a CRON job?
Hello I have not been able to find my answer anywhere else, so now i post it he Code: [Select] <html> <body> <p></p> </body> </html> <?php $var = 'Some text here!' ?> My questions is now: How do i get the text in the PHP variable into the HTML paragraph text? The code is on the same page Thanks in advance Jones Hi Everybody I am doing online education portal. Teachers and students will be registered on this site. Student will search teachers and create schedule to learn subjects. For that student can pay to the teacher some amount. So that student can increase his/her balance. That means he can transfer some money to website company account through credit card or paypal or google checkout. I did credit card part. But i am not getting any idea to do in paypal. That means student can enter amount and click paypal button, it should show paypal page. So that he can login into his paypal account and pay that amount. After pay that amount we can get IPN (Instant Payment Notification). So that we can store that amount into my database under that student ID. Please tell me how can i do this? Hi There, I was wondering if there is a way, or in deed if there is an off the shelf calendar that would be able to interact with an SQL database? I want to be able to display a week's worth of dates (Mon - Fri) - and show what is on each day, for different people, say 4. If possible, I would like it to read start and end dates from the DB, and if that entry is over 3 days, display it on 3 calendar days. Has anyone heard of anything like this, or is it easy to code up? Thanks in advance Matt I have set up u chat page on my site and would like to know how to make it use the logged in members user name from my database rather than assigning them a guest name, i think i have found the code that needs editing but i have no idea what needs to be done. I think the editing needs to be done in this code somewhere but i could be wrong, Please help. Code: [Select] <?php require_once dirname(__FILE__)."/src/phpfreechat.class.php"; $params = array(); $params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params['firstisadmin'] = true; //$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat $params["debug"] = false; $chat = new phpFreeChat( $params ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>phpFreeChat- Sources Index</title> <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" /> <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> </head> <body> <div class="header"> <img alt="phpFreeChat" src="style/logo.gif" class="logo2" /> </div> <div class="menu"> <ul> <li class="sub title">General</li> <li> <ul class="sub"> <li class="item"> <a href="demo/">Demos</a> </li> <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?> <li> <a href="checkmd5.php">Check md5</a> </li> <?php } ?> <!-- <li class="item"> <a href="admin/">Administration</a> </li> --> </ul> </li> <li class="sub title">Documentation</li> <li> <ul> <li class="item"> <a href="http://www.phpfreechat.net/overview">Overview</a> </li> <li class="item"> <a href="http://www.phpfreechat.net/quickstart">Quickstart</a> </li> <li class="item"> <a href="http://www.phpfreechat.net/parameters">Parameters list</a> </li> <li class="item"> <a href="http://www.phpfreechat.net/faq">FAQ</a> </li> <li class="item"> <a href="http://www.phpfreechat.net/advanced-configuration">Advanced configuration</a> </li> <li class="item"> <a href="http://www.phpfreechat.net/customize">Customize</a> </li> </ul> </li> </ul> <p class="partner"> <a href="http://www.phpfreechat.net"><img alt="phpfreechat.net" src="style/logo_88x31.gif" /></a><br/> </p> </div> <div class="content"> <?php $chat->printChat(); ?> <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?> <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p> <?php } ?> </div> <div class="footer"> <span class="partners">phpFreeChat partners:</span> <a href="http://www.jeu-gratuit.net">jeux gratuits</a> | <a href="http://jeux-flash.jeu-gratuit.net">jeux flash</a> | <a href="http://www.pronofun.com">pronofun</a> | <a href="http://areno.jeu-gratuit.net">areno</a> | <a href="http://www.micropolia.com">micropolia</a> | <a href="http://www.zeitoun.net">zeitoun</a> | <a href="http://federation.jeu-gratuit.net">federation</a> </div> </body></html> hi, I'm trying to integrate paypal integration. it is integrated successfully and I've checked on my test account too. i want that as user purchase package he should able to download the file. to do that i want to set return variable. as user complete the payment process on paypal , it should auto come back to my website. as he'll be back I'll set his flag to paid and allow him to download file. the problem I'm facing is on my test account. when i paid money. i didn't return to my website. so i don't know to set his flag to true. any one know its best solution??? i want immediate response to client to pay online. Please advise... Thanks Hi
I am working as a PHP developer in my organization. They asked me to integrate several couriers in of our client's website. As i have only 1 year of experience and i am new to this.
Can any one help me by sending me the courier integration scripts in PHP for
1. Blue Dart
2. Delhivery
3. FEDEX
4. ARAMEX
5. GATI
Kindly help me.
Hi, I'm integrated paypal standard integration on my website. It integrated successfully.. we collect the data on website and send all info to paypal. in database order table. I set the status to 0 which means order is pending. Now i'm confused how it'll be 1? when i'll come to know that client has paid the payment. do i need to set it flag manual in admin panel after check into my paypal account? or do i need to send some parameter on return valraible. if he i'll return to that page then query to set flag 1. Please help me on this. and let me know which one is best method??? Looking forward. Best regards I'm having some trouble getting some kind of validation built into a form on my site. I'm using multiple scripts in a form including a lightwindow, as well as some other scripting I found to allow me to submit my form inside the lightwindow. I'm dying to get some kind of validation code added to the script to stop all of the spam emails, but I'm not able to do it, as I don't truly know PHP. I tried using a recaptcha, following the instructions carefully, but I think my problem there was that I don't have a simple Code: [Select] <input type="submit" /> instead, I have: Code: [Select] <a href="thanks.php" style="text-decoration: none" params="lightwindow_form=Catering,lightwindow_width=632,lightwindow_height=1600" class="lightwindow_action" rel="submitForm"><button tabindex="21">Submit</button></a> Could anyone take a look and give me some pointers? mikeandzachsbbq DOT com/Catering/ - click on the link that says Click Here to use our Do-It Yourself mikeandzachsbbq DOT com/Catering/form.php - form w/out the lightwindow Thanks in advance hi, I'm integrating google checkout on my website using php. anyone have any idea if google checkout take payment on website just like paypal payment pro??? Looking forward. Best regards Hello Friends, I am developing a website with frontend as php and backend MySQL. And i am about to integrate the Skipjack payment gateway. But due to lack of sufficient materials and knowledge about this gateway. I am having the problems in integrating this. So all i got is the encrypted FormBuilder html form code which displays a order button only. When it is clicked the form of skipjack loads. But those form fields are already present in the website. So all i need is to pass the form field value plus other values from my website to the skipjack website and to redirect back to my website when the payment is done. Is there any way to do so? Thanks in advance. STRANGESOUL Hi! I am having some trouble integrating my autoresponder (aweber) and my webinar (gotowebinar) into my Tell a Friend script. The process is like this: The subscriber submits at the Tell a friend script and gets registered in my webinar and autoresponder at the same time. I have all three scripts ready but cannot connect them in the manner described above. Can anyone help me please? Hi, I am integrating Paypal Pro into my checkout and struggling to get it to work correctly.
I am using this code to connect to paypal - which all works correctly, processes payments as it should and send paypal receipts to the customer and to me.
The problem is that when Paypal redirects back to my receipt page, it is not triggering the email (customer_mail_new.php and client_mail_new.php) to tell me what exactly they customer has ordered!
I've been staring at this code for hours now and wonder if anyone can see anything obvious that I have (or haven't) done that is causing the emails to not send at the end of the receipt page?
(paypal.php)
<?php |