262 Posted Topics

Member Avatar for keeleyb

Please show your code. I do not understand how you expect people to assist in "connecting the two" if you do not show the code to start with

Member Avatar for keeleyb
0
357
Member Avatar for romaman

This has been done time and time again. Have you tried using the search function in the forum? There are plenty of examples

Member Avatar for diafol
0
123
Member Avatar for noahwilson

Store the data in a database, and use $_GET[] to identify the URL page. Connect to database and select and echo the `$pageTitle`

Member Avatar for paulkd
0
390
Member Avatar for Squidge

Hi all, I seem to have an issue with my CSS. The page setup that has the issue is: <footer> <section 1></section 1> <section 2></section 2> <section 3></section 3> </footer> The sections are set to 33% width and floating left. The containing footer does not seem to expand in height: …

Member Avatar for Squidge
0
180
Member Avatar for yy886

@yy886, This is part of an upload script i put together and using well: $mime = array('image/gif', 'image/jpeg', 'image/jpg', 'image/png'); if (in_array($_FILES['file']['type'], $mime) == FALSE) { echo "You are attempting to upload a \"{$_FILES['file']['type']}\" file type. <br/> This is not permitted.<br/>"; } else { `$mime` is an array that holds …

Member Avatar for yy886
0
292
Member Avatar for OsaMasw

have you tried running it? i think magic quotes is now removed from PHP ( think i read it somewhere): just checked : http://php.net/manual/en/security.magicquotes.php removed since 5.4.

Member Avatar for OsaMasw
0
250
Member Avatar for davy_yg

When uploading files you also need to declare a "enctype". Also please show the full error, and the lines of code it will refer to

Member Avatar for TonyG_cyprus
0
295
Member Avatar for davy_yg

Your question makes no sense. Where did the code come from? Was it written by yourself

Member Avatar for davy_yg
0
115
Member Avatar for Squidge

I have a very simple class for date display: class timing { public $today; public $year; function __construct() { date_default_timezone_set('GMT'); } function now() { return $this->today = date("D j M Y"); } function year() { return $this->year = date("Y"); } } I am pulling in using: $x = new timing(); …

Member Avatar for Squidge
0
117
Member Avatar for garyrichard

Storing images in DB is something that has been regularly discussed on DaniWeb. Personally i would not store the actual image in the DB, only the location and file name. This is a faster way to pull the images in.

Member Avatar for veedeoo
1
254
Member Avatar for javacle
Member Avatar for Squidge

Hi All, I am using pritaeas found here: http://www.daniweb.com/web-development/php/code/430455/configurable-table-class I am pulling in the data and my brain has taken a vacation. I am using $arr = $dsn->getRecord('memeber', array('user_id' => 2)); But cannot for the life of me pull the data out. I get duplication as well from the data: …

Member Avatar for pritaeas
0
150
Member Avatar for davy_yg

you have a missing " from your img tag echo ('<td><img src="photos/image'.$i.' "/></td>');

Member Avatar for Squidge
0
104
Member Avatar for Squidge

Evening all. I am goign through my Image upload script and found it looks messy, would you recommend an cleaner way of doing this: move_uploaded_file($_FILES['file']['tmp_name'], 'photos/' . $_FILES['file']['name']); try { $fileName = $_FILES['file']['name']; $resizeObj = new resize('photos/' . $fileName); // *** Resize options: exact, portrait, landscape, auto, crop $resizeObj->resizeImage(225, 150, …

Member Avatar for Squidge
0
116
Member Avatar for rambleon

I use percentage as this allows for more flexibility and fluidness for cross browser/platform. For text i use `èm`

Member Avatar for rambleon
0
267
Member Avatar for Xantipius

reformed smoker. Used to smoke 20~30, unless i was drinking and it nearly doubled :(

Member Avatar for mattster
-1
545
Member Avatar for irfath
Member Avatar for NardCake
Member Avatar for Abdulove

I have to agree. Are you asking a question? If you are unsure on how to ask a well formed question, please refer to the link in my sig. Thank you for your understanding.

Member Avatar for masterjiraya
-3
125
Member Avatar for Squidge

Hi All, I am creating an "About Us" portfolio page for a company. On this page will be a small bio and a photo. The bio is not a problem, uploading and storing/calling the image is not a problem, as i already have code i can reuse. The part i …

Member Avatar for Squidge
0
175
Member Avatar for Tinnin

This may help: http://stackoverflow.com/questions/14071791/how-to-remove-duplicate-rows-from-a-csv-file

Member Avatar for Tinnin
0
4K
Member Avatar for kyriacos1986
Member Avatar for masterjiraya
0
186
Member Avatar for Squidge

Afternoon all. I have noticed recently that i am unable to log in to DaniWeb from Android Mobile. When selecting the "Member Login" the pop out box appears then disappears before i can do anything. Could this be looked at? Or has DaniWeb got a mobile app?

Member Avatar for <M/>
0
201
Member Avatar for yap.junjie.7

Maybe you do not have short hand PHP tag enabled. Above line 42: <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Change to : <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> Although, if you are new and starting fresh code, i would suggest you drop the MYSQL syntax usage and opt for either PDO with MySQL, or …

Member Avatar for TonyG_cyprus
0
396
Member Avatar for fheppell

This is one i found for generating 1 time/use URLS: http://phpmaster.com/generating-one-time-use-urls/ *All kudos to PHP Master on this one*

Member Avatar for Squidge
0
195
Member Avatar for kakalahori

`session_start()` needs to be the first thing. Shift your PHP above the HTML doctype

Member Avatar for annaharris
0
307
Member Avatar for fheppell

It maybe over kill but i use salt and SHA1 I use this to create a random 50 character string: private function randomString($length = 50) // Produces random string of $lenght { $rdString = ""; $possible = '12346789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; // Available characters for string $mxlength = strlen($possible); if ($length > $mxlength) …

Member Avatar for annaharris
0
185
Member Avatar for kijiko
Member Avatar for Squidge

I googled and googled to try and find a comprehensive wiki/tut on how to share htdocs across a dual platform. My base install is Windows 7 64bit, and recently (6wks ago) set up a dual boot. One thing pained me for a while of not being able to use the …

Member Avatar for Squidge
5
854
Member Avatar for kakalahori

@kakalahori You need to install the PHPUnit module. This can be easily done via PEAR http://pear.php.net/manual/en/installation.getting.php Or via GIT https://github.com/sebastianbergmann/phpunit/ I used PEAR in my set up as it also allows access to the pre compiled libraries.

Member Avatar for kakalahori
0
245
Member Avatar for Squidge

Hi All, Not sure really where this should go but..... I have recently setup a shared HTDOCS under XAMPP across a dual boot system (Win7 & Ubuntu). Not sure if there is an interest, but if anyone would like to know how to do it, please give me a shout …

Member Avatar for Squidge
0
134
Member Avatar for rolanduk
Member Avatar for rolanduk
0
445
Member Avatar for Daniel Claff
Member Avatar for hbm11

This is just the SQL code for the table. You need to add an additional column for example `bday DATE NOT NULL,` Change bday to what you want it to be called

Member Avatar for Squidge
0
146
Member Avatar for Vingklippt
Member Avatar for kakalahori

ZF2 is no longer using zf.bat. If you look over the base tutorial it takes you through how to install: cd /my-project/dir git clone git://github.com/zendframework/ZendSkeletonApplication.git cd ZendSkeletonApplication php composer.phar self-update php composer.phar install This obviously assumes you have composer, and git installed. Here is a sample tut: http://bigemployee.com/zend-framework-2-simple-web-application-crud-using-ajax-tutorial/ that the …

Member Avatar for kakalahori
0
250
Member Avatar for Vingklippt
Member Avatar for IIM
0
297
Member Avatar for hanan-kh

From what i understood OOP is not com[patible with MySQL. You will need to use MySQLi or PDO wrapper. Your increment is in the wrong place, this should be after doing X and looping, for example: $i=1; while($i<=5){ echo "The number is " . $i . "<br>"; $i++; #<-- increment …

Member Avatar for Squidge
0
168
Member Avatar for Squidge

Evening all I am working my way through Zend Framework 1.x, and seem to have an issue. I am trying to set the `doctype()` to HTML5: class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function __initDoctype() { $this->bootstrap('view'); $view = $this->getResources('view'); $view->doctype('HTML5'); } } I have check the documentation and using `doctype('HTML5')` …

Member Avatar for LastMitch
0
491
Member Avatar for rexmatthew

I agree. People are not going to review 1000 lines. Post the code you pinned as the problem

Member Avatar for rexmatthew
0
365
Member Avatar for asifalizaman

+1 to pritaeas. A simple google search will bring up some introduction tutorials which are nice to follow. You will need: a development environment locally (XAMPP/EasyPHP) an IDE (NetBeans, Dreamweaver, even NotePad++), many chocies for these, so try a few, and see which one you are more comfortable with.

Member Avatar for diafol
2
293
Member Avatar for hwoarang69

Have a look here: `http://php.net/manual/en/function.mysql-fetch-assoc.php` $image seem's to be very popular variable, the below is not tested session_start(); include("connect.php"); $user = $_SESSION['username']; if($user) { $user_id = $_SESSION['user_id']; //get user_id who ever is loged in $sql = "SELECT * FROM image WHERE user_id = $user_id ORDER BY image_id DESC"; } echo …

Member Avatar for suresh.godavarthi.77
0
2K
Member Avatar for Shodow
Member Avatar for Rasool Ahmed
Member Avatar for Rasool Ahmed
0
431
Member Avatar for surajdgiri
Member Avatar for phoenix_2000
-1
353
Member Avatar for Fiorentino01^

DO NOT USE THE MYSQL extension. Although a lot of tuts will still use this, it has been superceeded by MySQLi. You could also opt for, and one i use, PDO. MySQLi basic connection: $mysqli = new mysqli("localhost", "your_user", "your_password", "your_database"); if ($mysqli->connect_errno) { echo "Failed to connect to MySQL: …

Member Avatar for IIM
0
318
Member Avatar for tuyendoan

Evening tuyendoan. In your .htaccess file you will need something like : RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php This will remove the `.php` from the URL on the first level. You would need to test further for the deeper nested ones Although i would suggest …

Member Avatar for Squidge
0
274
Member Avatar for PF2G

> Hi, i'm creating a image gallery, using .htaccess. And this is my first time i work with .htaccess > Simple, you cannot use .htaccess for this. You cannot execute code in that manner.

Member Avatar for Squidge
0
441
Member Avatar for pol.bala

> this code snippet is written with dirty values? why write code for semeone and allow dirty values in one of the most vulnerable of php functions? > sanitize the post values or suffer the consequences. > > this code snippet is written with dirty values? why write code for …

Member Avatar for Webville312
0
748
Member Avatar for 44strong

This is not actually a PHP question, but............ if you install the speed test extension for Chrome or Firefox, this will indicate where you can improve page speed.

Member Avatar for JorgeM
0
325

The End.