39,320 Topics

Member Avatar for
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
659
Member Avatar for phphp

Sir I have these codes <?php $result = array( array('date'=>'2017-04-17','voucher'=>2,'code'=>'1401001','party'=>'Michael','d1'=>'Payment of services','dr_amount'=>500), array('date'=>'2017-04-18','voucher'=>1,'code'=>'1401002','party'=>'Eric','d1'=>'Payment of goods','dr_amount'=>1000), ); while ($row=mysqli_fetch_array($result)){ echo $row['party']; } ?> the codes display this error message **E_WARNING : type 2 -- mysqli_fetch_array() expects parameter 1 to be mysqli_result, array given -- at line 7** What I am doing …

Member Avatar for diafol
0
115
Member Avatar for Jack_20

Output PDF is overwrite, please solve this. advanced thanks <?php require('mysql_table.php'); class PDF extends PDF_MySQL_Table { function Header() { //Title $this->SetFont('Arial','',18); $this->Cell(0,6,'World populations',0,1,'C'); $this->Ln(10); //Ensure table header is output parent::Header(); } } //Connect to database mysql_connect('localhost','root',''); mysql_select_db('pro'); $pdf=new PDF(); $pdf->AddPage(); //First table: put all columns automatically $pdf->Table('select * from products'); …

Member Avatar for Kevin_28
0
4K
Member Avatar for phphp

Sir I have these codes $last_date=""; $last_vno=""; $queryx = "SELECT MAX(t1.date)as mxdate,MAX(t1.vou_no)as mxvno,max(d1)as d1 FROM vouchers t1 WHERE t1.date = (SELECT MAX(t2.date)as date FROM vouchers t2 where vou_type='CP' and dr_amount>0)"; $resultx=sqlsrv_query($con,$queryx)or die("Error". sqlsrv_errors($con)) ; if ($resultx){ while ($rowx = sqlsrv_fetch_array ($resultx)){ $last_date=$rowx['mxdate']; $last_vno=$rowx['mxvno']; $myparty=$rowx['d1']; } }else{ echo "no data found"; …

Member Avatar for diafol
0
203
Member Avatar for moh_2

hello brothers, I have this VBScript program: Set WSHShell = Wscript.CreateObject("WScript.Shell") Set FSO = Wscript.CreateObject("Scripting.FileSystemObject") Set EnvVar = wshShell.Environment("Process") tBestand= EnvVar("USERPROFILE") & "\Desktop\Items Numbers.txt" Set Bestand = fso.createtextfile(tBestand,2) For x = 1048639472 To 1048640474 Bestand.WriteLine("Item Number is=" & (x)) Next Bestand.close WScript.quit The Output is: (about 1002 lines). Item Number …

Member Avatar for rproffitt
0
319
Member Avatar for UI

Programmer Folks! I first started learning php in September 2015. In 2 wks I read the whole tizag tutorial after understanding it. http://www.tizag.com/phpT/syntax.php (Browse the chapters list on the leftside of the page). I was still "raw" in experience when I suddenly read that php 7 was out and when …

Member Avatar for cereal
0
1K
Member Avatar for UI

Ladies & Gentlemen, My Fellow Buddy programmers and would be buddy programmers! Watching the following youtube tutorial I built a basic php proxy but for some reason it is not working. Can you guess why ? The clip uses the deprecated ereg_replace and so I replaced it with preg but …

Member Avatar for rproffitt
0
307
Member Avatar for UI

Ladies & Gentleman, Or should I say 'Gentle Ladies' and 'Hard Men' (tough guys)! :winky: Here is my very latest (New Code) reg.php. I have modified it by: * Removing outdated strip tags, mysqli_escape_string. * Bound input parameters on the user reg form. * Added htmlspecialcharacters code on output to …

Member Avatar for UI
0
386
Member Avatar for Lord_2

Actually the form below is a registration form, and i only have ' username, email, password and confirm password field' so i want to add another field name job, but keeps getting error. see the code below; if (!preg_match("/^[a-zA-Z ]+$/",$name)) { $error = true; $name_error = "Name must contain only …

Member Avatar for diafol
0
330
Member Avatar for UI

New Friends! :) The following is my member registration code as of latest. ISSUE 1: I get this error: Parse error: syntax error, unexpected '_' (T_STRING), expecting ',' or ')' in C:\xampp\htdocs\e_id\register_edited.php on line 10 What is wrong ? I copied the "'images/'_$FILES['avatar']['name']);" from a youtube tutorial on how to …

Member Avatar for UI
0
337
Member Avatar for davy_yg

Hello, This is the error message on laravel public_html: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\framework_freshway\public_html\index.php on line 50 I wonder why it appears? This is only on public_html the framework is on seperate files: <?php …

Member Avatar for diafol
0
969
Member Avatar for Teri_1

I passed two parameters in the URL. Now I need to retrieve the parameters log_id and dogID onto the next page to process a form. But I can retrieve the first parameter but i cannot retrieve the second parameter. Im using $log_id= $_SESSION["userid"]; $dogID = $_SESSION["dogID"]; Is there another way …

Member Avatar for abubaker_2
0
21K
Member Avatar for CB

Hello everyone, Does URL shortening effects the POST data in php? whenever we used it for using services like Bitly, Google URL Shortner etc.

Member Avatar for rproffitt
0
244
Member Avatar for shashigowda

Hi, i am beginer to codeignitor,i know how to write basic active queries in CI. i want to know how to write a query(having multiple conditions,double parentheses) in which supports CI. query is: $query="SELECT * FROM `apply_special_leave` WHERE ((`from_date` <= '$dt1' AND '$dt1' <= `to_date`) OR (`from_date` between '$dt1' AND …

Member Avatar for diafol
0
352
Member Avatar for Teri_1

Im going through a tutorial online that would allow users to post status to their wall and to their friends but im getting the error : Warning: mysqli_query(): Couldn't fetch mysqli in /storage/h7/475/1137475/public_html/template_status.php on line 15 It is storing to the db but its not displaying on the user profile. …

Member Avatar for diafol
0
1K
Member Avatar for Prince_9

I would to know how I could do a barcode detecting using a phone IMEI to know its phone type and specifications in php Many Thanks

Member Avatar for diafol
0
222
Member Avatar for hani_1

Hello everybody I'm looking for someone to help me about my problem, im trying to display user details after login with allow user to edit some fields . the user can edit these fields password repassword description address telephone email and these two fields not allow to edit only display …

Member Avatar for rproffitt
0
1K
Member Avatar for solomon_13000

Employee.php <div class="col-xs-12"> <h2>Listing Employee</h2> <hr> <div class="employeeGrid"> <table> <tr> <th><a href="" ng-click="orderByField='name'; reverseSort = !reverseSort">Name</a></th> <th><a href="" ng-click="orderByField='age'; reverseSort = !reverseSort">Age</a></th> <th><a href="" ng-click="orderByField='gender'; reverseSort = !reverseSort">Gender</a></th> <th><a href="" ng-click="orderByField='company'; reverseSort = !reverseSort">Company</a></th> <th>Action</th> </tr> <tr ng-repeat="person in employee | orderBy:orderByField:reverseSort""> <td>{{person.name}}</td> <td>{{person.age}}</td> <td>{{person.gender}}</td> <td>{{person.company}}</td> <td> <button class="btn" ng-click="viewEmployee(person.id)"><span …

Member Avatar for solomon_13000
0
350
Member Avatar for UI

Guys & My Ladies, This LOGIN.php was working lastnight and so I don't know why not now. The ELSE at 53 gets triggered even though I have typed the right password! What do you think of line 16 ? ... if($numrows >1) I tried the following but no luck: if($numrows) if($numrows …

Member Avatar for diafol
0
352
Member Avatar for phphp

Sir I have these codes <html> <head> <style type="text/css"> table { font-size: 12px; font-weight: bold; font-family: Verdana, Geneva, sans-serif; } #mytable td { border: 1px solid #CCC; font-size: 14px; } #mytable thead { border: 1px solid #6C3; background-color: #CCC; color: black; line-height: 30px; height: 30px; font-size: 14px; } #mytable input[type="text"] …

Member Avatar for rproffitt
0
7K
Member Avatar for gahhon

<customers> <customer> <ID>C1</ID> <FirstName>Jack</FirstName> <SurName>Wong</SurName> <Email>jack@hotmail.com</Email> <Password>081292</Password> </customer> <customer> <ID>C2</ID> <FirstName>Ashley</FirstName> <SurName>Rachael</SurName> <Email>ashley@hotmail.com</Email> <Password>081292</Password> </customer> <customer> <ID>C3</ID> <FirstName>Vongola</FirstName> <SurName>Steve</SurName> <Email>vongola@hotmail.com</Email> <Password>081292</Password> </customer> </customers> I have a existing xml showing like that. I did some research through net, but they all were talking about one element. For example `<Email>xxx@hotmail.com</Email>` But what …

Member Avatar for cereal
0
410
Member Avatar for UI

I'm trying to build a script that adds multi entries into same single cell or mysql row. The script tries monitoring what you are browsing via the: <pre><input type="text" name="browse_url" size="120"></pre> and then record your viewed urls into the same row (position: 0), column: browsings like so: 1.com,2.com and so …

Member Avatar for UI
0
358
Member Avatar for UI

Buds! How to code so php forces mysql to show only the final row of the column ? The followings are how I coded (2 copied youtube tuts) to show all rows to allow user to delete multiple rows: SAMPLE 1 [php] <?php session_start(); require "conn.php"; require "site_details.php"; ?> <!DOCTYPE …

Member Avatar for diafol
0
442
Member Avatar for UI

Programmer Experts, I'm embarking on an interesting project to gain work experience in php. Just stuck on one thing and wondering if you can help. You probably used Team Viewer. This is where I create a Team Viewer session and get a unique number and if I give you it …

Member Avatar for diafol
0
376
Member Avatar for ahmad.albab.87

hi, i have searching and tested lots of scripts to get the real IP behind the proxy but still not get the right result. Could anyone with this experienced helps me out. Thanx..

Member Avatar for ahmad.albab.87
0
172
Member Avatar for janicemurby

ive just done a simple register form where i can check username exists and before i put the username exists in the register works but when i have the username check in it doesnt work can someone check this over for me the script and error log are as follows: …

Member Avatar for janicemurby
0
723
Member Avatar for infoitmanoj

I was write code for excel vba xml database values write into text file. when i using without any special characters xml values parsed into their text file without any issues but when i using special characters xml cannot parse special characters (&,- etc) error getting on my macro page. …

Member Avatar for rproffitt
0
598
Member Avatar for janicemurby

Hi im ageeting the following error in my script can anyone find a fix or solution hus jan x Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/letsswin/public_html/template_pageTop.php on line 7 Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/letsswin/public_html/template_pageTop.php on line 8 //check …

Member Avatar for Teri_1
0
342
Member Avatar for alex-i

Hi Everyone I have 2 variables $price = 60; $dec = 1%; I want to create a function which give me result for next 10 years example: 2017 = 59.4 2018 = 58.8 2019 = 28.2 . . . 2027 = Code can be PHP or Script Regards

Member Avatar for rproffitt
0
284
Member Avatar for steph_2

Within a php environment we have one checkbox linked to one hidden field with the SAME NAME ($name). How could we send only the values of the selected checkboxes? php <input type"checkbox" name="<?echo $filename;?>_<?echo $variable;?>" id="filename_<?echo $variable;?>" value="1"> <input type="hidden" name="item_<?echo $filename;?>" value="<?echo $quantity;?>"> In the generated html this checkbox …

Member Avatar for vsmash
0
443

The End.