46 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for janicemurby

hi im attempting to update a php srcipt and fixing errors and i have a error in the following block but cannot work out where if($_SERVER['REQUEST_METHOD']=='POST' && isset($_POST['smcomplete'])){ if(empty($_POST['abouth'])) $err_h = $aboutherorhis; elseif(strlen($_POST['abouth'])<6) $err_h = $datashort; else{ ERROR ON THIS LINE>>> $match = ($_POST['matchsame']=='on')?1:0;slBodyType'], $_POST['slHeightfrom'], $_POST['slHeightt $data = array($_POST['rdgender'], $_POST['slagefrom'], …

Member Avatar for janicemurby
0
291
Member Avatar for patk570

I have a code that is working to show images and description. But I am trying to get it to loop through 3 pictures wide, then loop again. and display them, I am going to add pagination to the script, but before i do that i need it to loop. …

Member Avatar for patk570
0
424
Member Avatar for patk570

Hey everyone, I have a MYSQLI statement that i would like to add pagination to. I would like to have it set to 5 per page, and not have a negative value if you are on page 1 (disables back link) Every tutorial i have been seeing allows for a …

Member Avatar for patk570
0
656
Member Avatar for mattyd

I want to collect basic user information when they land on an index page, such as: IP Country City State Zip Code I've looked into sites such as ipinfo.io that offer a service regarding these details, but think it may be easier to collect the same info via PHP. From …

Member Avatar for Dani
0
436
Member Avatar for Stefce

Here is the error it gives me Warning: mysqli::query(): Couldn't fetch mysqli in C:\xampp\htdocs\bootstrap\tickets_info.php on line 27 db problem. Warning: main(): Couldn't fetch mysqli in C:\xampp\htdocs\bootstrap\tickets_info.php on line 31 Fatal error: Wrong SQL: SELECT `Uplata`, `Dobivka`, `Date`, `sharedTime`, `match1`, `match2`, `match3`, `match4`, `match5`, `match6`, `match7`, `match8`, `match9`, `match10`, `match11`, `match12`, …

Member Avatar for Stefce
0
465
Member Avatar for Stefce

Hello i want to make notification when new message is received, i have a row `seen` with values `0` and `1` if is 0 then its unread else is seen i got this code but when it displays the output shows the number of rows but for example i have …

Member Avatar for Stefce
0
299
Member Avatar for janicemurby

i have followed a tutorial for a working checkbox group after failed attempts with others. On test file it was working but when i add it to my site i dont get any results after submitting form. First of all here is the file from tutorial. Sorry in advance for …

Member Avatar for ryantroop
0
245
Member Avatar for janicemurby

hi i have followed a online tutorial to replace photo system on my site and all went well till i attempt to upload photo i get no file selected even if i have just gone on the page but after pressing submit i get a success message and the photo …

Member Avatar for janicemurby
0
198
Member Avatar for janicemurby

hi i got another syntax error in a script that i am fixing to add onto my main site can someone take a look to see whats going off this error is You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version …

Member Avatar for janicemurby
0
220
Member Avatar for janicemurby

hi i managed to change my site from mysql to mysqli with all your help although i have one line thats causing me problems in inbox.php can someone check this out and see whats wrong the error im getting is Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given …

Member Avatar for janicemurby
0
330
Member Avatar for janicemurby

PHP Warning: mysqli_error() expects exactly 1 parameter, 0 given on line 31 $insert = mysqli_query ($conn," insert into user set user_name = '".$_POST['uname']."' , age = '".$age."' , page = '".$page."' , user_password = '".$password."' , user_birthdate = '".$user_birthdate."' , puser_birthdate = '".$puser_birthdate."' , user_gender = '".$_POST['gender']."' , user_country = …

Member Avatar for rubberman
0
13K
Member Avatar for Abbas Ansari

I'm trying hard with displaying details from a selected option in a drop down list for my project. I have a drop down list which is populated from a MYSQLi query. I want the user to select an option and the values associated pulled from the database and displayed to …

Member Avatar for cereal
0
19K
Member Avatar for shashigowda

Hii..this is mysql query $querry="SELECT CONCAT(`insert_id`, `type`) AS 'order_id' FROM orders WHERE email='$email'"; $order_id=mysql_query($querry); echo $order_id; i need to convert this into ** mysqli**. Any Help??

Member Avatar for shashigowda
0
368
Member Avatar for SimonIoa

I have a problem with mysqli syntax. I really can't see what the problem is in this code. I dont know much about it. When i use it on a function like this public function Somefunction() { $query=mysqli_query($this->db,"SELECT title,url,img FROM table WHERE status='1' ORDER BY id DESC")or die(mysqli_error($this->db)); while($row=mysqli_fetch_array($query,MYSQLI_ASSOC)) { …

Member Avatar for SimonIoa
0
175
Member Avatar for johnef_sh

I am try to figure out how to check current time against time in database and header the user to "expired page" if the current time is greater than the one in database "1 hour" $email = $token = $check_time = ""; $crossToken = $db->prepare("SELECT email, token, check_time FROM pw_reset_company …

Member Avatar for johnef_sh
0
270
Member Avatar for accra

Hi, am interfacing gps tracker TK106 with our online platform. The data we get from gps device is in this format (06667778889-9BP05000066677788899140815A0533.8206N00009.7045W000.0165936157.6200000000-L0000F51C) Instractions form [this site](http://sourceforge.net/p/opengts/patches/1/) explains the variours data sets in the string above, for example the first 11 digits 06667778889 is the device's programmable ID ,used in placed …

Member Avatar for accra
0
781
Member Avatar for accra

Hi, i found this code [online](http://www.macrostash.com/2011/09/17/demo-use-a-php-mysql-database-to-load-markers-on-a-google-map/#comment-2675). After installing and running code on my website, the screen shows nothing back, though code is firmly in place. <script type='text/javascript' src='jquery-1.6.2.min.js'></script> <script type='text/javascript' src='jquery-ui-1.8.14.custom.min.js'></script> <style> BODY {font-family : Verdana,Arial,Helvetica,sans-serif; color: #000000; font-size : 13px ; } #map_canvas { width:100%; height: 100%; z-index: 0; …

Member Avatar for accra
0
428
Member Avatar for johnef_sh

I want if the user clicks submit to return the the selected value when the form reloads that what I try and no luck <?php $getData = $db->prepare("SELECT * FROM first_university_degree_list"); if ($getData->execute()) { $res = $getData->get_result(); while ($data = $res->fetch_array()) { ?> <option value="<?php echo $data['univ_degree']; ?>" <?php if($FirstUniversityDegree …

Member Avatar for almostbob
0
199
Member Avatar for accra

Is there another function for creating php sockets apart from this socket_create(AF_INET, SOCK_STREAM, SOL_TCP); ? Really need to know, thanks.

Member Avatar for accra
0
120
Member Avatar for Iikeloa

Hi I have a problem with inserting into the database. This is my code : $insert = $db_con->query("INSERT INTO users (username,password,email,com-name,com-logo,com-phone,com-mobile) VALUES('".$username."','".$enc_pass."','".$email."','".$com_name."','".$profile_path."','".$com_phone."','".$com_mobile."')");

Member Avatar for Iikeloa
0
277
Member Avatar for accra

Hello, i want to allow my users to reset their passwords if they forget it. My problem is that i lose the code sent to user via email, if this is the link sent to user via email http://localhost/citi/forgot.php?code=8b15388bc5ca7e2821ab6ce59b465f684942dd7901f4e31439575ab72028f84f , when the user get to forgot.php and type in the …

Member Avatar for cereal
0
448
Member Avatar for johnef_sh

I need to upload 5 images at ones with they labels I have made this before to upload many images at one it works fine but I need to have an label for each image how this can be done take a look at my code. this is the HTML …

Member Avatar for Mike_danvers
0
473
Member Avatar for LaurenE

Good Day Daniwebbers! Wonder if I can have some help. I am trying to build an 'admin panel' of sorts where the user can add content to their website, edit and delete it, all from one spot (Not unlike a CMS system I guess but purely for the purpose of …

Member Avatar for LaurenE
0
193
Member Avatar for patk570

I am not sure why this is not working, Its setting the flags perfectly but will not update events... if(isset($_REQUEST['del'])){ if($_REQUEST['del'] == 1){ $asset_id = $_REQUEST['assetID']; $sql = "UPDATE assets, events SET assets.del_flag=1 , events.del_flag=1 WHERE assets.id='$asset_id' AND events.asset_id='$asset_id'" or die(mysqli_error($mysqli)); if ( $mysqli->query($sql) ) { $addevent1 = "INSERT INTO …

Member Avatar for patk570
0
136
Member Avatar for patk570

Hi guys, I am trying to get the last_insert_id() from the table above, that way when it sends the query and is successful, it then updates the events table with timestamp, id , asset type and asset id from the insert code. I am currently using the max(id) but its …

Member Avatar for patk570
1
2K
Member Avatar for patk570

I am trying to do a count of all types in there(hardware and software) I thought i had the correct structure...but I guess i am wrong... $count = mysqli_query($mysqli, "SELECT COUNT(*) AS total_count FROM assets WHERE cust_id=$custID AND (asset_type='hardware' AND asset_type='software') "); echo mysqli_error($mysqli); $count = mysqli_fetch_object($count); $count = $count->total_count; …

Member Avatar for patk570
0
159
Member Avatar for diafol

While extending a mysqli class, I ran into an issue with binding parameters. I've read that db names and table names should not be used as parameters, but while I was pondering this statement... SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$dbname' I thought, as the db name is a …

Member Avatar for diafol
2
288
Member Avatar for Iikeloa

Hi I'm working on a function and it was working good until I had an error that tells me I should swich from mysql to mysqli so I did swich but I'm having a lot of errors ! (the function is working fine but I have a lot of errors!). …

Member Avatar for pardeepkk
0
239
Member Avatar for joshmac

I few weeks ago, I posted some code that I need help converting to MySQLi, now I need some help converting it to PDO. The code allows you to enter queries and commands and brings back the column headings and the information that I am looking for into a table. …

Member Avatar for joshmac
0
3K
Member Avatar for mmcdonald

There has got to be a better way of doing this. First of all pay no attention to the lack of validation and error checking. I just want the core of the script to work first. Also, Block 1 and Block 2 execute, Block 3 does not. Whats the best …

Member Avatar for mmcdonald
0
1K

The End.