please i need help with my work.. write a program in c++ that accepts a real number with two decimal places and output the vallue in words.. [assume that no amount will exceed 999999999999.99

Member Avatar
Member Avatar
+0 forum 4

Hello everyone :) I have this lines of codes and i get : > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp22\htdocs\folder\index.php on line 52 ( 19 in the code below ) <form method="POST" action="index.php"> CODE : <input type="text" placeholder="Type the code" name="searchfor" /> <input type="submit" name="submit" value="Search for the code"> </form> <?php if(isset($_REQUEST['submit'])){ $searchfor = $_REQUEST['searchfor']; $terms = explode(",", $searchfor); // i've deleted this and no-positive results , i was thinking that it gives a false value to the code :-?? $query = "SELECT * FROM edit WHERE id=$searchfor" ; // i've tried also with …

Member Avatar
Member Avatar
+0 forum 7

Can anyone help me solve this problem, i tried everthing and googled all over everything, but still cant find solution, i hope somebody help me, ty, *sorry for my broken english $db=mysql_connect ("localhost", "root") or die ('I cannot connect to the database because: ' . mysql_error()); $mydb=mysql_select_db("database"); $sql="SELECT ID, FirstName, LastName FROM `contacts` WHERE FirstName LIKE '%" . $name . "%' OR LastName LIKE '%" . $name ."%'"; $result=mysql_query($sql); $numrows=mysql_num_rows($result); echo "<p>" .$numrows . " results found for " . stripslashes($name) . "</p>"; while($row=mysql_fetch_array($result)){ $FirstName =$row['FirstName']; $LastName=$row['LastName']; $ID=$row['ID'];

Member Avatar
Member Avatar
+0 forum 8

I know there are other post conserning this but they dont seem to help me. When I run the varaible `$results` through the function `Mysql_num_rows()` it returns as an error saying its not a valid result. Also same for the `mysql_fetch_array()`. function results(){ if ($_POST['search'] != "") { $search = mysql_real_escape_string($_POST['search']); $search = filter_var($search, FILTER_SANITIZE_STRING); //remove unwanted characters from number. $search = ereg_replace("[^A-Za-z0-9]", "", $search); $search = strtolower($search); $search = preg_replace('/\s+/','',$search); } else{echo '<div class="noresults">No Results</div>'; die();} //start query for search $query = "SELECT * FROM members WHERE number = '$search' ORDER BY user_id ASC"; //run query $results = mysql_query($query); …

Member Avatar
Member Avatar
+0 forum 5

Hello! This is my first post here, hehe. Seems to be a great site. Anyways, I'm quite new in PHP, but it's fun and I think I'm learning quite fast :) There's appeared a problem for me now though, and I can't see what the problem is...? I have made a form, which posts values to my php-page. This page inserts the values to the database, and that works just fine. But now I wanted to add the function to check if a value is already in use; in this case the value you entered in the email field. So …

Member Avatar
Member Avatar
+0 forum 2

So im trying to make a password login and im getting errors. i got past my Unable to jump to row 0 error with this: **mysql_num_rows($result) >= 1** but now it wont jump to the row when the password is correct ether :/ here is the code; whats wrong with it? $result = mysql_query("SELECT * FROM users WHERE CallSign LIKE '".$_POST['signin']."'"); $result1 = mysql_query("SELECT * FROM users WHERE Password1 LIKE '".$_POST['password']."'"); if (mysql_num_rows($result) >= 1 || mysql_num_rows($result1) >= 1) { die('Could not connect: ' . mysql_error()); } else if (mysql_result($result, 0) == mysql_result($result1, 0)) { echo "<br>CallSign matches password"; setcookie("user", …

Member Avatar
Member Avatar
+0 forum 3

Hello! I want to create a script which mails emails to subscribers. I'm almost done, but I'd like it to say "Sent to # people". I've tried using: [CODE]<?php $dbc = mysqli_connect('localhost', 'username', 'password', 'database') or die('Error: Could not connect to database'); $query = mysql_query("SELECT * FROM table"); $number = mysql_num_rows($query); echo "Sent to ". $number; mysqli_close($dbc); ?> [/CODE] When I try it I get: [B]Warning:[/B] mysql_num_rows() expects parameter 1 to be resource, boolean given in mysite.com/number.php on line 7 Any suggestions on how to fix it? Thanks!

Member Avatar
Member Avatar
+0 forum 7

The End.