39,326 Topics
| |
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; } | |
Hi! I have table of records of my database. I have too many rows, so i decidet to add feature what i dont know how to call english, but mybe it's call page numbering. So i need split my table after some 10rows and its will make after table Paga … | |
How to send user detail page to my email.with full deatils <?php mysql_connect("localhost","root",""); mysql_select_db("Users"); $mysql_query =("SELECT uid,`Name`,Department,Problem,Ext_no,Ip_Add,Remark,Email FROM entryform ORDER BY entryform.uid DESC limit 1 "); $result = mysql_query($mysql_query); while($data = mysql_fetch_row($result)){ echo(" <td > <tr> <td> Complaint NO. :- $data[0]</br></br></td> <td> NAME :- $data[1]</br></br> </td> <td> DEPARTMENT :- $data[2] … | |
i was thinkg some thingklike this. i have a database image->image_id, image, image_keyword, image_name ...etc index.php- search bar <form class='form6' method='post' action='search.php'> <input type='text' name='search' class='field2'/> //search bar field <input type='submit' name='search' class='button' value='Search' /> //submit button </form> search.php <?php include("include/header.php"); $i = 0; $search_p = $_POST["search"]; $terms = explode(" … | |
Hi all. I use the following js function to dynamically create an new <tr> and <td> in my table. Then I insert an <input>. : function testName(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); //firstname var cell1 = row.insertCell(0); var element = document.createElement("input"); element.type … | |
Hi, i doing personal page module. this is the my edit profile page code. i have error in 126.call to undefind error. this is error line. $personal->$personal=getDataInArray(); what is the proble? any body plz help me. public function executeEdit(sfWebRequest $request) { $this->frm_edit = new PersonalForm(); $personal=array(); $error=array(); //if they submitted … | |
Hey. So here is my code... config.php <?php $localhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "test2"; $connect = mysql_connect($localhost, $dbuser, $dbpass); mysql_select_db("$dbname", $connect); ?> regprocess.php <?php include"config.php"; $username = $_POST['username']; $email = $_POST['email']; $password = md5($_POST['password']); $insert = 'INSERT into users(username, email, password) VALUE("'.$username.'","'.$email.'","'.$password.'")'; mysql_query($insert); ?> … | |
I'm a PHP newbie, and I need to replace my current code for linking to a stylesheet (which looks like `<link rel="stylesheet" href="/style.css" type="text/css"> `) by a PHP alternative. If it's important, the code I'm using which will link to it is [php-mobile detect](http://code.google.com/p/php-mobile-detect/). The structure I wanted to use … | |
Hi, I'm new to PHP and I want to know how to prevent SQL injection? Any php features can prevent the SQL injection? | |
hi dear experts first I should apologize you because my english is not very good I have a big problem that I hope to find someone help me here. I need to get pure text from pdf file in PHP because i should count the pdf words for my project … | |
so i have a zoom.php where i have a link. <a href='deleteimage.php?imgid={$row['image_id']}'>Delete</a> if user click on it it goes to deleteimage.php where i have a form. in form i have field where i store imagid. <form class="form" action = 'deleteimage.php' method = 'post'> <input type='submit' class='button' value='Yes'> <input type="hidden" name … | |
Hey, I have a script that sends a user an html-formatted email. Usually once per email, there is an exclamation point popping up in the middle of the email. I've read somewhere about this happening because of some limit at 1000 character limit, and it could be around that point, … | |
hey guys, any tricks that i can use to link a table row with an employee ID that comes from a db ? heres the menu code, where the link must happen, so i can call other functions like delete and modify. sorry it's french, supprimer = delete, modifier = … | |
I am trying to write a email address to a file. the user enters there email addy and submits which brings them to the following code. however im unable to figureout what im doing wrong to write to the file. any ideas? $myfile = file("data/mylist.lst"); $fh = fopen("data/mylist.lst","w"); for ($index=0; … | |
Hi all, I am creating a new login form, different from the default login, but when i try to connect to the database. it said password is not correct.. I just realised that password is encrypted. but i dont know what kind of algorithm it uses. I am using joomla … | |
Hi, I have an array with keys like this: "9.345" "16.765" "8.123" "0" "0.123" How do i sorth them, so the keys looks like this (numerically, descending order): "16.765" "9.345" "8.123" "0.123" "0" Thanks | |
If you ever go to [URL="http://www.hostip.info/"]http://www.hostip.info/[/URL], you will find a Community Geotarget IP Project. The great thing about it is that it is free to use. :) Now, this is just a snippet of code to begin working in the world of GeoIPs. There's a lot more info to be … | |
I have city and its corresponding locality. City is showing dropdwon and Locality in Dropdown-Checkbox I got code Dropdown-Checkbox, when user clicks city then its locality will show in Dropdown-Checkbox. It is showing multilist control in thepage but when I choose city it is showing multilist-box rather Dropdown-Checkbox. How I … | |
Hi, Is tere any difference between these two codes or is it just a matter of taste? Thanks var days = new Array('Sunday','Monday'); var days = Array('Sunday','Monday'); | |
so i am trying to count view that enter on zoom.php page. also if user keep of refreshing his page than dont add views and i dont want to use function. i want to store view on my database image->image_id,user_id,image,image_name,image_view | |
so i have a zoom.php where i have a link. <a href='deleteimage.php?imgid={$row['image_id']}'>Delete</a> if user click on it it goes to deleteimage.php where i have a form. in form i have field where i store imagid. <form class="form" action = 'deleteimage.php' method = 'post'> <input type='submit' class='button' value='Yes'> <input type="hidden" name … | |
$queryget = mysql_query("SELECT * FROM image WHERE user_id = '$user_id_s'"); while($row = mysql_fetch_assoc($queryget)) { $count_c = $row['image_comment']; $count_image++; $count_comment = $count_comment + $count_c; } for some reason it is not going inside the while loop and ideas? | |
Hi Experts! I have a question and will be grateful if you can help me out with some ideas. In an online hotel or ticket booking reservation system, normally a user is allocated a specific time to complete their registration / payments etc and during that time the system holds … |
The End.