39,320 Topics
| |
Struggling to get the following code to work. The code works if I just put an individual table in SELECT FROM, but I can't get anything when I try and do INSERT INTO table and then substitute it in. I am a complete noob at this and I know in … | |
Warning: mysql_query() [function.mysql-query]: MySQL server has gone away in C:\xampp\htdocs\a_upload\upload.php on line 71 Warning: mysql_query() [function.mysql-query]: Error reading result set's header in C:\xampp\htdocs\a_upload\upload.php on line 71 GalleryUploadMessageProfileStatistticsChange PasswordDelete Account if(!$sql=mysql_query("INSERT INTO image VALUES(NULL, '$user_id_db', '$image', '$image_keyword_p' , '$image_full_name', '$image_short_name_p', '$image_des_p','$file_size' ,'$image_resolution', 0)")) Warning: mysql_fetch_assoc() expects parameter 1 to be resource, … | |
I've looked everywhere and haven't found a clear step by step tutorial on how to secure sessions/cookies. Here are snippets of my code, i'd like to know how i can improve on session security to prevent fixation/hijacking and cookie safety. This is snippets of code for the user login system. … | |
As the title says, I need to stop a user's browser from caching the form they've submitted. Is there any way of doing this? | |
Hi, all this is my file expire_show.php it shows expiry of those agreements which will expire with in 90 days from current date. Users have to login to their accounts for viewing these expiry alerts. but they require these alerts on their email. [B]1. how i can format these for … | |
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\a_upload\index.php on line 114 line 144: while($row = mysql_fetch_assoc($R)) $count = 0; $Q = "SELECT (SELECT image_short_name FROM user) as `image_short_name`" .",`image_id`,`user_id`,`image_short_name`,`image`" ." FROM `image`" ." ORDER BY RAND()" ." LIMIT 5"; $R = mysql_query($Q); echo " <!DOCTYPE html> … | |
i have a form in one page thet leads me to another page . exemple: when i want to delete a page in my cms , i am click on the icon that is leads me to page called delete.php. i want that when i click the icon the option … | |
I have a problem to update my sql <?php $host="localhost"; // Host name $username="matanc_cmd"; // Mysql username $password="123123"; // Mysql password $db_name="matanc_cms"; // Database name $tbl_name="content"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // get value of id … | |
Hi Guys First of all i would like to state that i am new in php so my question might appear stupid for the geeks here. I want to create an image downloader in php , that is i need a textbox and a submit button. The user enter each … | |
my code gives undefine index error .. and i don't know how to solve it... i m making online testing program but every eror in every step is undefine index error... ok my html file is <html> <form action = "http://localhost/onlineexam/home.php" method = 'get'> <center><h1>WELCOME TO ONLINE EXAMINATION</h1> <br> <br> … | |
Hey guys, Im looking for a simple blog script for a website. It doesnt need to be fancy, just a single admin page and then the blog display page. No styling is required, as I am to add this to a HTML template. If anyone could point me in the … | |
| if I have a function with 1 param that is default, meaning if it isn't sent in the function call it get's it's value from the value I put in the function definition- like this: function func(a$, $b, $c=null){} I can call this function like this: func(1,2); //$c get's null … |
Hello, I have this code which grabs url from a webpage, when i add multiple urls, sometimes some of the webpages does not have images in the div that i mentioned in this php code so it returns with this error : Fatal error: Call to a member function find() … | |
I am creating my purchasing system for my game at the moment, but I am struggling on a part of it and wondered if any of you could offer me some guidance? The problem I am facing is adding X amount onto a value but if that means it goes … | |
Hi, I am having trouble with this chunk of PHP script: <?php $deny = array("Example IP"); if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { header("location: http://www.google.com/"); exit(); } ?> It works fine, its just when I try to link to a file that has the $deny var, it wont work. I tried using … | |
Hi, I have text file which has lots of text as well as HTML data. There are some line as shown below. 06/30/12 00:40:30.73 Sending Email - Group: 4FD7917824F1B-EMAIL, 0, Message: There are lots of lines like above in text file. I want to extract following data from the entire … | |
I try to create dropdown list with informations from title column in sql table, but never succeeds. My connection and query is good. Can somebody to help me with this? mysql_connect(***); mysql_select_db(***); $query = mysql_query("SELECT title FROM test"); Thanks! | |
Ok i think i'm getting closer to what I need.. Here's the error msg i'm getting. Error: 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 'table WHERE id = Stef Longo' at line … | |
I have created a page myfunction.php and added two functions: function AppNotify ($Uid,$ Message,$ Data) { return; } function AppNotifyUnfriend($Uid,$ Message,$ Data) { return; } After that I created another page and include “myfunction.php” on these page then create code $done= AppNotify (‘12’,’hello’,’Delete’); $done2= AppNotifyUnfriend(‘12’,’hello’,’Delete’); The problem is when i … | |
Hi, I have a database table filled with interesting data. On my webpage I would like to let a user pick two rows in the table and compare the data to see how it differs. Picking what rows to compare would be done by two dropdown lists. The data in … | |
hi i have a little bit of issue just thingking if somebody can give me a hand out here.. the issue is when i compute for a car rate..it will depend on the date of rental and the return date,which is already coverd the problem is it will not really … | |
Here is the code for my login page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Login</title> <style type="text/css"> #apDiv1 { position:absolute; width:200px; height:115px; z-index:1; left: 608px; top: 201px; } #apDiv1 form table tr td { font-family: "Trebuchet MS"; } </style> </head> … | |
Hi, I have looked at this code and I cannot see the problem. If anyone can spot the error then I will be very grateful. Basically I am returning an array from a .PHP in json format the code is here. echo json_encode($anarray); the array is made up like "vegetable" … | |
| Hi I'm having an issue with the **chmod**. I can't seem to excute the file. Everytime I upload a file and write something it keep saying "**Directory is not writable chmod(700)** Here is the code: function checkPath ($path) { if (!is_dir ($path)) { printSecurityText ("Directory does not exist: ".$path.""); return … |
hello every one i want to ***creat a forum that some one can contribute an article and others can reply its.*** please help me Thanks in advance.e | |
Can some help me to convert the below xml data into php array. Thanks in advance. <dataroot> <content id= "1"> <quest><![CDATA[<FONT FACE="Arial">Which of the following is not the measure of a physical quantity?</FONT>]]></quest> <opt1><![CDATA[<FONT FACE="Arial">kilogram</FONT>]]></opt1> <opt2><![CDATA[<FONT FACE="Arial">impulse</FONT>]]></opt2> <opt3><![CDATA[<FONT FACE="Arial">energy</FONT>]]></opt3> <opt4><![CDATA[<FONT FACE="Arial">density</FONT>]]></opt4> <ans><![CDATA[a]]></ans> <ans_desc><![CDATA[<FONT FACE="Arial">kilogram is the name of the fundamental … | |
I am trying to add an username and password into a database using JSON. I cannot get it to work, any ideas? Thank you. <?php mysql_connect("localhost","sdr001","************"); mysql_select_db("tristate"); $userID = $_POST['userID']; $password = $_POST['password']; $q=mysql_query("INSERT INTO users VALUES(>'".$_REQUEST['userID']."'"); while($e=mysql_fetch_assoc($q)) $output[]=$e; print(json_encode($output)); mysql_close(); ?> | |
I'm trying to think of better ways to fight spam than having a captcha that a user needs to fill in. I've considered emailing a confirmation link to the user that they need to click in order to send the message they filled out in the form, but with Google … | |
I have s_no in my database's table. Which is increment automatically whenever new entry comes. But this is only int. I am using this as a ID of particular task. I want this in varchar. means id should be like "a45c725". How to achive this | |
trying to user left margin 50px on this link but it no working. index.php echo "<a href=\"zoom.php?img={$row['image_id']}\"> <b id='bold2'>" . $image_short_name_db . "</b></a>"; c.css .bold2 { margin-left:50px; } |
The End.