Why is doing this bad?
So, Throughout my script it seemed logically correct to call a function via a variable value. Example I have function computer() { return 'pcs are good'; } function laptop() { return 'laptops are...
View Articlephp forms generated from mysql and submit
How would I submit the below info? <?php include "common/db_connect.php"; $date = date("Y-m-d"); if($_POST['button']){ } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
View Articleselecting from multiple tables mysql php code
$notificationing = mysql_query("SELECT * FROM notifications, inmymind, blogsnotification where nuser='$row[id]' || user='$joysong[friendid]' order by date DESC LIMIT 0,8"); while($notes =...
View ArticleComplete script building tutorials
For people who already know the basic programming concepts that they cover in ordinary tutorials (i.e. the tutorials you find if you look up PHP tutorial, or AJAX tutorial), I think what would be...
View ArticleClick on text show another page
Can somebody help me. With the following code, when clicking on see more details the page companydetails must be opened. This happens but no records are showing. Here is my code: <?php...
View ArticleFirst real problem forcing me to go OOP
I'm curios to know if the OOP approach would suit this problem over procedural.(from your perspective) I am using curl, to fetch and post information. I believe its best broken down into stages...
View ArticleAdjust search so it only finds rows with all words?
Hi all, I am currently trying to upgrade my websites search function, currently it will just list every article it finds with any of the words searched using PDO MySQL like so: $db->sqlquery("SELECT...
View ArticleHTML Form Chain select with MYSQL
Hello everyone, I am trying to create a minicab booking form with mysql I have created following tables category (this where the locations categorised like Airport, Postcode, Stattions etc)...
View ArticleHTML Form Chain select with MYSQL
Hello everyone, I am trying to create a minicab booking form with mysql I have created following tables category (this where the locations categorised like Airport, Postcode, Stattions etc)...
View ArticlePDO Connection to mysql
Hello all, this is just one of those questions that i think that have an rather quick awnser. I m concerned about the PDO connection i made witch takes some time to stablish, i was using an self made...
View ArticleAdding reply feature to comment system
I have a comment system that basically allows you to post a comment, but you cant reply to any existing comments. Here is the source code for it actually. Basically php sends the comment data to the...
View Articlefile upload security
Hi. I've used a white list approach to only allow certain file types to be uploaded, but I would like to know if this is enough protection.. I've been reading about editing the htaccess to allow...
View ArticlePHP EOL not working
I'm creating a CSV file using php and what to extract data from mysql however each record needs to be on a new line and the current coding isn't doing this. Any suggestions? <?php include...
View ArticleInsert in Database and Email attachement
hello? I hope to get some help, I have a script of job applications, basically what it does is when a user is going to apply for a job, the user information (name, email, message, cv) are sent to the...
View ArticleOutputting multidimensional array
I have an array like but larger and it could have different types and levels. This array is taken from MySQL and I've called it $courses array(23) { [0]=> array( { ["name"]=>...
View ArticleNot get session in my chat apps
I have a website that i integrate a chat app into it (FREICHAT ) now i wanted to make the user that log in to my the site to chat with user name, according to freichat this idea is 100% possible and...
View ArticleHow to load value to text field when choose value in select
I have problem need help that, I have a form have 1 select filed and 1 text field, I want when I choose value in option of select the text field will load/appear value in proportion to value of select,...
View ArticleWill I have any trouble storing 200kb in memory?
I'm writing a spec for some coding I need to have done I need to have a CSV file read in and parsed The data in total would be 200kb - with 500 - 600 rows Is there any problem in storing the data in...
View ArticleUnable to get error message from move_uploaded_file
I'm trying to test error conditions for file uploads, but when a file intentionally fails, I'm not even sure how to access the code. Here's a snippet: $file_arr = $_FILES[ 'digifile' ]; $fn =...
View Articlecurl and cookies in php
I want to ask you how to send headers to simulate the cookies which keeps values of options and then to download the file. For example If I would like to insert IP here:...
View Article