30 Posted Topics
Re: Hi, I agree with others that PDO/Prepared Statements are the way forward. I only started learning PDO for about two weeks and even thou it can be a little confusing to begin with it's well worth the learning curve, i am now and already using PDO and it makes mysql … | |
Hi, When a user registers on my site there status is 0 (not active) ... meaning they not activated there account via email. When they register i also store the DATETIME they registered, i store it in MySQL using MySQL DATETIME and using `NOW()` in my INSERT query on registration. … | |
Hello, Can someoneone tell me when you `prepare()` a statement (in my case an update statement) and then `execute()` it, i then check using `rowCount()` after the update query (see code below) if `rowCount() > 0` if it is then a match was found and update took place, but i … | |
Hi, I'm developing a blog that will have categories. I want to be able to store blog posts in more than one category. My problem is i am not sure how to go about it. I have a table called posts: CREATE TABLE `posts` ( `post_id` int(10) unsigned NOT NULL … | |
Hello, I am going to be building a blog and have rattled my brains out on this but could someone please explain in much detail as possible how i would go about building a blog archive ? I don't mean i want the php code just the logic behind it. … | |
Hello, I posted here as although it's in regards to mysql the thing i want to ask is in regards to php itself. I have two tables below as follows: [CODE]CREATE TABLE `users` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `status` char(10) NOT NULL, `username` varchar(15) NOT NULL, `email` varchar(50) NOT … | |
Hi, I have gone over and over the subject and still confused. I currently develop in PHP 5.2.x along with MySQL. (awaiting host to upgrade to 5.3.x, hopefully not to long although on local i develop using php 5.3.5) Currently i use the standard MySQL functions in PHP like: [B]mysql_connect()[/B],[B] … | |
Hi, I have created what i think is correct is one mysql_query with multiple counts. Could someone please tell me if i have done it rite ? plus how would i be able to access each count query using PHP so i can display each count query result? If it's … | |
Hi, I have a fully pledged membership system and want to integrate my own user referral system but want some tips, advice really on the logic of it. Basically already registered users on my site will have the option to refer people, only registered users. I will try to explain … | |
Hi, I basically have two functions; the first one below [b]GenerateFormTokenHash()[/b] is placed in a hidden field on my form and echoed out in the hidden field plus it stores the token in a session called [b]token[/b]. The second function below [b]IsValidFormTokenHash()[/b] is called straight after the check is made … | |
Hi, I have a password reset form and a user can enter either there username or email in one text box. One problem i am having is with validating the data. I have a username regex function that works fine to validate username and uses php's inbuilt FILTER_VALIDATE_EMAIL. Basically when … | |
Re: Hope this helps, here's my two pennies worth. 1. Firefox 2. Google 3. PHP, MySQL (DB back end), HTML, Javascript, Jquery, Ajax 4. NetBeans (free and fantastic) 5. Only ever developed for myself; been doing it on and off for about 18 months so not a old time developer who … | |
Re: Hi, If you don't know any programming languages your either going to have to look for possibly an already made script which maybe hard to find or pay; as it would be a complex system and certainly going to take many hours of hard work to acheive something like this. … | |
Hi, I have the code below for a login script. I not finished it yet and i moved from Dreamweaver to Netbeans a while ago and all my code has lost it's indentation and formatting. I am missing some curly bracelets i am sure of it but cannot find where … | |
Re: Thanks for this :) I was looking for an already made simple bbcode function. Will put this to good use. Thanks! | |
Re: Hi try this. You don't need the semicolon after $configid only after the bracelet. I also added LIMIT 1 so it only updates one row. I also added a die(mysql_error()); to end of query so if it fails it will give you an error. Also added to each column name … | |
Hi, I have a sign up form that generates a activation key and emails it to user and they cannot login until account has been activated etc. I know how to do the MySQL query to check if activation key already exists and have a function that generates a random … | |
Hi I am wondering if one of the PHP pros on here could answer this question for me. When validating user input to be put into a database like mysql, i use mysql_real_escape_string() but i also use strip_tags(), htmlentities() and trim() . My question is should i just be using … | |
Hi, I got some zip files on my server people can download and am having a strange problem. Can't remember if i ever checked in IE but in FireFox, Google Chrome, Opera everything is fine. When i download a file from my website in IE the file is getting corrupt. … | |
Hi, I have developed a download / upload script that also counts the downloads of each downloaded file. For statistics i currently got total files and total overall downloads but would like to extend this so it can say how many downloads there has been in a week, month, year. … | |
Hi, Sorry it's me again :-O I am in the middle of creating a download/upload management script. Currently it has one upload method HTTP upload via HTML form which obviously is not good as users would be restricted by the PHP max upload size and script timeout issues and so … | |
Hi, Does a file have to be writable in order to be deleted? If a file is writable using the php [b]is_writable()[/b] function does it mean it can also be deleted because it is writable? Reason for asking is before i attempt to delete a file and record from database … | |
Hi, I know and understand what magic quotes does, but have never written any of my scripts to check whether magic quotes is on or not; and if on stripslashes() . I thought it was time that i do this check incase any of the scripts i create are used … | |
Hi, I am driving myself mad. I have not posted the full code but wondering if someone can help. I am testing a deletion of a record and file using the code below. The problem i am having is that although i delibrately remove the the variable $id from the … | |
Hello, I have created a script and as part of the script i want the script to detect the upload_max_filesize which is set in the web servers php.ini file. It will be displayed on the file upload webpage which is accessible to admins only. Now at the moment i am … | |
Hello, I have a script that works great, basically i have a mysql database that contains information about files; like filename, description, size etc. The information is displayed on a webpage in a nice formatted table. each file has a link next to it and once pressed the script below … | |
Hi, Was just wondering how do you developers check for vulnerabilities in your scripts. Apart from doing some manual testing, do you use any tools to check for vulnerabilities in your scripts like forms etc? I am trying to look for some software that i can install on computer or … | |
Hi, I want to know what you think is best for me to do. I got a functions file that is included on every webpage on my website as it is in the top.inc.php file althou not all pages will use the functions file. So my question is, should i … | |
Hi, I have basically created two functions in a filed called functions.php . They are as follows: [CODE] # Form Token Hash Generator (must be declared after if statement) function GenerateFormTokenHash(){ $token = $_SESSION['token'] = md5(uniqid(mt_rand(), true)) ; return $token; } # Form Token Hash Validator function IsValidFormTokenHash(){ return $_POST['token'] … | |
Hi, I'm new here so first i would like to say hello to everyone :) I have been learning PHP for the past year on and off and have built a fully pledged website. Since my website first launched it has progressed into a full membership system which i love … |
The End.