39,393 Topics

Member Avatar for
Member Avatar for jkon

A simple Data Layer for OOP PHP Applications Hello, first of all to understand this tutorial would be best if you have some knowledges about OOP ( https://www.daniweb.com/programming/web-development/tutorials/437592/introduction-to-phps-object-orientation by priteas ) and DB usage (MySQL in this case) with PHP https://www.daniweb.com/programming/web-development/threads/499320/common-issues-with-mysql-and-php by diafol ). What we will try to achieve …

Member Avatar for jkon
4
2K
Member Avatar for shany0786

This may appear as child problem but i have confusion about this When we document Root what this means?? I am creating directory strucure for framework eg this is directory structure from code tutsplus `----public Document root where public files are accessed -css -images -content -js ------ Resources -library -template …

Member Avatar for shany0786
0
393
Member Avatar for ribrahim

Dear Member, I'm using MYSQL 5.6 and have 3 tables: 1. Customers (Cutomer_id, Customer_Name) 2. Order1 (Order_Id1, Customer_id) 3. Order2 (Order_Id2, Customer_id) I need to write a query to count the number rows from Order1 and Order2 group by Customer_Id. The result should be like: Customer_Id Customer_Name Number of Orders …

Member Avatar for diafol
0
275
Member Avatar for UK-1991

Hello, Recently I wa trying to develop an audio player of sound cloud as I got inspiration from here http://en.israelstory.org/episode/whats-love-got/ you can click file 1 by 1 and notice on the player hw is it playing I also tried to do the same but it's not orking when I clicked …

Member Avatar for diafol
0
175
Member Avatar for gentlemedia

I'm trying to get the right path and so far I have this which kind of works, but not if the file is in a sub directory. These links I have in my navigation: <ul> <li><a href="<?php echo $_SERVER['DOCUMENT_URI'].'about/organisation.php'; ?>">Organisation</a></li> <li><a href="<?php echo $_SERVER['DOCUMENT_URI'].'about/team.php'; ?>">Team</a></li> </ul> This works from my …

Member Avatar for gentlemedia
0
594
Member Avatar for developer707

Hello to everyone, Currenty I have a php project that uploads files to the server and save some extra information into the database. My problem is that I want to make a feature that copies a folder structure with files included to a database. I am trying to copy the …

Member Avatar for diafol
0
945
Member Avatar for jhbalaji

Basically i am trying to write a PHP License scrip for my Product Since i am newbie to PHP I can't do that well I need a PHP License script where a text file will be hosted in my server when the client uses the product for first time it …

Member Avatar for pritaeas
0
1K
Member Avatar for lewashby

The program below is just a simple test to see if I can get it to fetch the correct data from MariaDB and then display it on the screen but so far I'm not having any luck. I left the action attribute's value blank because I want the PHP form …

Member Avatar for cereal
0
593
Member Avatar for LibraryCode

Hi all,my question is i have a form: ![form.jpg](/attachments/large/4/b93dd71ea1dd4f7611edc5ff89832a8f.jpg "align-center") And database: ![database.png](/attachments/large/4/498755bd870d504cf718682b0626d69e.png "align-center") how would i exreact data entered in the form field from database and display in seperate table? ![table.png](/attachments/large/4/8d3074983efeb9799c5474c8e9172afd.png "align-center")

Member Avatar for diafol
0
330
Member Avatar for Stefce

Hello everyone, first of all i like to say that the new daniweb webdesign is AMAZING i really like it and hope this site it will become number one for programming and if it does please never BAN its users like stackowerflow do but thats other theme.. :D I have …

Member Avatar for Stefce
1
441
Member Avatar for Saifur_2

Hi everyone, I use laravel because its great. but i didnt use it on live server yet. I am using a sheared server and i uploaded my files to public_html folder and run my website. But browser shows a white blank page and then i open my browser console it …

Member Avatar for diafol
0
263
Member Avatar for SirMahlon

When i send emails from my website using the mail() function the email goes with my hosting server domain instead of mine(marlon.com or info@marlon.com). Please any help will be appreciated. Thanks

Member Avatar for Dani
0
155
Member Avatar for SirMahlon
Member Avatar for shany0786

I want to what is better way of doing this.Suppose user visit a website he is not yet registered on our website so nav bar shows some options like sign up ,login, help these are options before registration now if user registrated for website after login options on nav bar …

Member Avatar for diafol
0
344
Member Avatar for ehpratah

Hi! Im creating individual excel file base on the duedate and client name of a reservation and sending it automatically on that date.but im having a trouble dispalying the SUM/ Grandtotal of each excel summary that i created. the grandtotal inside my while loop is also incrementing. i dont now …

Member Avatar for ehpratah
0
626
Member Avatar for James_43

Hi there, As an excerise I am trying to create a basic PHP blog. Creating the user login system was pretty straightforward, and I've 2 mySQL tables, one with user information, and one with the blog information (and with a foreign key referencing the user id). However, I'm stuck for …

Member Avatar for diafol
0
263
Member Avatar for jacob21

Hi, below code is extracing title,keywords,descrption,links. Need suggestions to find out IP address, Load Time, HTTP Status <?php function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); curl_close($ch); return $data; } $html = file_get_contents_curl("http://servicesonclick.com/"); //parsing begins here: $doc …

Member Avatar for Dinesh Kumar_1
0
895
Member Avatar for Ric_1

im new in php and i want to have a login that after 3invalid password attempts disables the login button. heres my login code thanks for the help in advance :D <?php session_start(); include_once 'dbconnect.php'; if(isset($_SESSION['user'])!="") { header("Location: home.php"); } if(isset($_POST['btn-login'])) { $email = mysql_real_escape_string($_POST['email']); $upass = mysql_real_escape_string($_POST['pass']); $res=mysql_query("SELECT * …

Member Avatar for hericles
0
993
Member Avatar for Mohit_9

Hello guys i have got a code from stackexchange which is working somehow but giving one issue that the post repeating themself and no. of post per page is not working here is the code where i called the template <?php /** * Loop - Archive * * This is …

0
93
Member Avatar for UK-1991

Hello I have created a website recently and my client is saying that your website is not secured I have easily created new tables and even a kid can get in to your database and modify your database. is this because I have used this <a id="svgtriangle_f9" xlink:href="mainpage.php?apart=1&floor=9" class="portfolio-link" onmousemove="ShowTooltip(evt, …

Member Avatar for jkon
0
186
Member Avatar for ramsiva

I need help for delete image from server. i have a path http://example.com/myapp/example/next/image.png any body help to remove image from server

Member Avatar for ramsiva
0
282
Member Avatar for James_43

Hey guys, Using PHP I store a datetime in a mySQL table. I am trying to draw that out and reformat the time. The datetime is contained within the array $user_data['6'] and the format in the mySQL table is set to datetime. The error I'm getting is Call to a …

Member Avatar for James_43
0
253
Member Avatar for chaitu11
Member Avatar for Dani
0
292
Member Avatar for shany0786

Question is not new but i can't make it work.I have registration form along with user registration form i also have a upload picture options.These are views // view for user data <form action="<?php echo base_url('Camping_register/register') ?>" method="post"> <h2>Camping <span class="red"><strong>Rent Details</strong></span></h2> <label for="business_name">Business Name</label> <input type="text" id="business_name" name="business_name" placeholder="enter …

Member Avatar for diafol
0
970
Member Avatar for kathymac

Hi I have a php script that reads in the contents of an existing html file and saves it to a variable called $home_page. For a test I displayed this by printing variable out and the output displays as expected. Then using fpdf I wrote this variable out to create …

Member Avatar for mcglk
0
212
Member Avatar for James_43

Hi all, I am using the PHP Facebook SDK to login users. A login button validates the user and returns to a callback 'fb-callback.php'. On this page, I dump the returned data into a mySQL table, start a Session, and redirect to the homepage. As a test, I stopped the …

Member Avatar for James_43
0
242
Member Avatar for Behseini

Hi everyone, Can you please let me know how I can assign the selected value from a dropdown list into a $variable and print or echo it in the screen For Example if I have a dropdown list of years like: [CODE] <?php $years = array(); for ($i = 1900; …

Member Avatar for dheerajvermawd
0
23K
Member Avatar for lewashby

When I look up connectin an html form via 'action' & 'submit' to php code I see that I am supos to give the form's action attribute the value of the php file I want to run upon submit. But what do I do if the php I want executed …

Member Avatar for diafol
0
50
Member Avatar for Adolfo_1

Hello....HELP, i have a script for saving textarea, but give me error and php is hardy for me: * Notice: Undefined index: page in C:\wamp\www\* *Warning: file_get_contents(): Filename cannot be empty in C:\wamp\www\.....* THE FORM HTML ... FOR CALL THE FILE <form action="" method="POST"> pagina: <input type="text" name="page" value="" /> …

Member Avatar for Adolfo_1
0
1K
Member Avatar for davecoventry

I'm trying to resize uploaded images so they fit into a slideshow. Specifically, I'm interested in the height of the image as the slider doesn't handle different heights too well. So I've implemented the code below: <?php function resizePhoto($ht,$fname,$dest,$pref,$SRCPath){ $image_path=$SRCPath.$fname; $image_atts=getimagesize($image_path); if(!$image_atts[0]){ echo 'Image data is corrupt, cannot process file:'.$fname; …

Member Avatar for davecoventry
0
327

The End.