39,323 Topics

Member Avatar for
Member Avatar for ak47carbon

i am working in php a year ago ,i am workjing in custom php ,but now i want to switch on php oop , tell me best toturial of oop ,

Member Avatar for veedeoo
0
206
Member Avatar for Borderline

I'm trying to generate a raceform site, with the results page displaying the horse, jockey and trainer as links which lead to their individual pages. I have the right effect, but it's taking a long time to load the page, which I'm assuming is due to the number of joined …

Member Avatar for Borderline
0
118
Member Avatar for adishardis

Hi, I've been searching now for the better part of the weekend but I can't get this to work :-/ I want to use Highcharts pie chart to display data from my mysql table. I want to count the column 'Types' occurences of the different Types in that column. Each …

Member Avatar for adishardis
0
150
Member Avatar for DaveyMoyes

Hi everyone, I have been trying to update a mysql database with the shortend url I get from bit.ly I have the shortend url displayed on the page, but everytime I try and update mysql with the variable $bitlylink.. instead of http://bit.ly/123abc the database is updated with http://the.full.website.url/directory/link.html How can …

Member Avatar for cereal
0
433
Member Avatar for OsaMasw

Hello guys, have a nice day... I've created function to test if the user is admin or not and return true or false depending on user function isitadmin($userid) { $query = mysql_query("SELECT * FROM users WHERE user_id = '". $userid ."' AND level = 1"); if (mysql_num_rows($query) > 0) { …

Member Avatar for OsaMasw
0
171
Member Avatar for apanimesh061

<!DOCTYPE html> <html> <head> <script type="text/javascript"> function ShowFile(sFilePath){ var oFileSystem = new ActiveXObject("Scripting.FileSystemObject"); frmEditHTML.tarHTMLText.value = oFileSystem.OpenTextFile(sFilePath.value).ReadAll(); } function SaveAfterEditing(sFilePath){ var oFileSystem = new ActiveXObject("Scripting.FileSystemObject"); var oFile = oFileSystem.CreateTextFile(frmEditHTML.filPath.value,1); oFile.WriteLine(sFilePath.value); oFile.Close(); } </script> </head> <body> <form name="frmEditHTML"> Select the HTML File you want to Edit <input type=file name="filPath" onchange="ShowFile(this)"> <textarea name="tarHTMLText" …

Member Avatar for diafol
0
464
Member Avatar for mpc123

HI I seem to have a problem with a drop down menu, the code seems to work fine and the values are showing in source code but do not show on the page???? Another issue is I dont know how to move forward after this to make a combo drop …

Member Avatar for AleMonteiro
0
190
Member Avatar for shahai.ali

how to get the data from the following `xml`: <HostipLookupResultSet version="1.0.1" xsi:noNamespaceSchemaLocation="http://www.hostip.info/api/hostip-1.0.1.xsd"> <gml:description>This is the Hostip Lookup Service</gml:description> <gml:name>hostip</gml:name> <gml:boundedBy> <gml:Null>inapplicable</gml:Null> </gml:boundedBy> <gml:featureMember> <Hostip> <ip>182.0.0.1</ip> <gml:name>Private</gml:name> <countryName>Private</countryName> <countryAbbrev>PR</countryAbbrev> <!-- Co-ordinates are available as lng,lat --> <ipLocation> <gml:pointProperty><gml:Point srsName="http://www.abc.net/xyz/srs/epsg.xml#4326"> <gml:coordinates>68.7833,30.4</gml:coordinates> </gml:Point></gml:pointProperty> </ipLocation> </Hostip> </gml:featureMember> </HostipLookupResultSet> following is what i was trying: …

Member Avatar for diafol
0
257
Member Avatar for Echo89

I know I could parse the files name for the extension, but that can be faked. I know I can get the mime type, but they can also be faked. I know I could use Magic Numbers, but on some files, they are not at the top of the file. …

Member Avatar for phorce
0
307
Member Avatar for rubai

This code reads a.txt file <?php $file_path = 'a.txt'; $file_handle = fopen($file_path, 'r'); $text_data = fread($file_handle, filesize($file_path)); print $text_data; fclose($file_handle); ?> I want to upload this text file using the code given below and want to read the uploaded file when I hit submit button. I know there is a …

Member Avatar for rubai
0
201
Member Avatar for hwoarang69

these 3 line store image in folder. //place image in the folder $ext = pathinfo($_FILES['image_file']['name'], PATHINFO_EXTENSION); //return png,jpg,etc $image_folder_name = $user_user_name_s . '_' . time() . '.' . $ext; //create unife image name move_uploaded_file($_FILES['image_file']['tmp_name'], "IMAGE/ITEMS/$image_folder_name"); //place image in folder what is i want to print the image now. how can …

Member Avatar for Squidge
0
1K
Member Avatar for onofej

Please could someone check this code for me as it is giving me You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near line . Although this type of question has been ask by someone …

Member Avatar for onofej
0
226
Member Avatar for sultankhan

hi evry one may be this a tip task or easy but for me it is not easy i have show.php and showpost.php page in show.php i am showing my picture while in showpost.php i am showing post now if a user add picture it should be on of my …

Member Avatar for urtrivedi
0
153
Member Avatar for sandjuks112

Hi! I have an image slideshow, but it shows first image in alphabetic sequence. I need it shows the fist image, that what has last uploaded in image folder, like sort by date. Sorry for my bad English. Here is the script <?php $imageDirectory = "images"; $interval = 5; ?> …

Member Avatar for diafol
0
318
Member Avatar for missy_mi

i am trying to do a pagination but, i cant seem to get the problem.. <? //pagination $objConnect = mysql_connect("localhost","root","") or die(mysql_error()); $objDB = mysql_select_db("custech"); $strSQL = "SELECT * FROM proposals "; $objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]"); $Num_Rows = mysql_num_rows($objQuery); $Per_Page = 4; // Per Page $Page …

Member Avatar for paulinetaylor85
0
332
Member Avatar for adishardis

Hi, I have a json_encoded array that comes out like this `{"y":33,"customTooltip":"BOK"},{"y":61,"customTooltip":"DRFlytt"},`... I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this `{y:33,customTooltip:'BOK'},{y:61,customTooltip:'DR'},` Is this possible or should I find another approach? I derive the array like …

Member Avatar for adishardis
0
134
Member Avatar for shahai.ali

hi i made a search but couldn't find a satisfied answer. any ways let me ask the question. as there are many freinds on facebook, twitter at social sites. and many other at gmail, yahoo and hotmail etc. now what i want is how to invite all the friends or …

Member Avatar for AndreRet
0
290
Member Avatar for DEAD TERMINATOR

On my site, I have navigation buttons that navigate through results of a search. Basically, what I want to do is to disable certain buttons at certain times (i.e you can't click the next button if you are on the last result). I'm looking for a way to do this. …

Member Avatar for diafol
0
256
Member Avatar for LastMitch

Hi, I'm trying to preventing consecutive duplicate pages. For example when I refreshed a page it show a word from each page and when I refresh again it should show a different word from a different page not staying on one page. This is my pages: Page1 = Mozart Page2 …

Member Avatar for LastMitch
7
434
Member Avatar for veedeoo

Hello Everyone, I got bored reading PHP questions. So, this is probably the best time to add another article here at daniweb.com. If someone ever stumbled upon by boring blog (mini-tutorial), I talked about how light and simple is the tinybutstrong templating engine. However, I began to wonder why not …

Member Avatar for diafol
1
1K
Member Avatar for DarkMonarch

i kept reading on sql injections after answering a guy on the subject and end up on this page: http://php.net/manual/en/pdo.prepared-statements.php which i think is great for optimisation and i will probably apply on this portal im working on, but ... what do you guys think about this prebuild template like …

Member Avatar for diafol
0
120
Member Avatar for hwoarang69

i now the differece between seesion and cookies. but i am not sure when one to use. when people make website like dreamincode, myspace, linkedin, etc.. wht they use. right now on my site when user log in session get started but if user hit remember me than cookie get …

Member Avatar for diafol
0
185
Member Avatar for Khav

I want to add a new feature in my present image upload script and that is automatic compression of images just like TinyPng.Basically i want a code snippet that detect 24bit PNG file and convert it to 8bit png file with full support for transparency and that also strip any …

Member Avatar for diafol
0
1K
Member Avatar for apanimesh061

I sent a C++ code snippet from textarea to another page using php. Evenything got printed but the as the header file was <iostream>, it did not get printed. Any piece of text that is enclosed by <> is not printed. What should I do ? Please help!

Member Avatar for deceptikon
0
101
Member Avatar for riahc3

Hello First off the server is running Windows 7 32bits. I have the following code: <?php $fp = fopen(getcwd()."/test.txt", "w"); fwrite($fp, "hello"); chmod(getcwd()."/test.txt", 0777); unlink(getcwd()."/test.txt"); fclose($fp); ?> It creates the file perfectly but afterwards I cannot delete it. Giving me this error: Warning: unlink(C:\test.txt) [function.unlink]: Permission denied in C:\writeanddel.php on …

Member Avatar for Ezzaral
0
1K
Member Avatar for davy_yg

Hello, I wonder how to install GDChart in Windows XAMPP PHP ? Thanks.

Member Avatar for pritaeas
0
162
Member Avatar for DJ-DOO

Hi, I'm really hoping someone can help me. I've created a clocking system. The user clocks in,the clockin time is stored in the db, the user clocks out, the time is stored in the db. However, I want to store the difference, in other words the hours that would've been …

Member Avatar for pritaeas
0
302
Member Avatar for rajeshswain

Hi Friends, I want to upload a image file to my mysql database. But before that i want to resize it. I have used the following code. But what happens is that the image is successfully resized but the quality is not retained. Please someone guide me with some help. …

Member Avatar for mukhtar1234
0
3K
Member Avatar for shahai.ali

hi i was trying the following to invite the list of contacts from gmail. <html> <body> <?php if(isset($_POST['submit'])) { $email = 'https://mail.google.com/mail/feed/atom'; $sender = 'abc@gmail.com'; $send = mail($email, "Invitation", "Testing e-mail", "From: $sender"); echo $send; } ?> <form action='inviteList.php' method='post'> <font>Invite your friends</font><br><br> <font><b>Email: </b> <input type='text' name='email' size='30'><br> <input …

Member Avatar for shahai.ali
0
280
Member Avatar for shahai.ali

i have following form in html: <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file"><br> <input type="submit" name="submit" value="Submit"> </form> and my upload_file.php is in the following: echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . …

Member Avatar for shahai.ali
0
2K

The End.