39,323 Topics
| |
Hi guys! Gday'..i have a program of counting of votes..i want to add [ICODE]viewing_bycourse.php[/ICODE] and [ICODE]viewing_bydepartment.php[/ICODE] for those who are already voted.. done with listing of all users who are already voted so i want to show the list of users by course and by deparment.. i dont know if … | |
Hello all, How many ways are there to put variables into a query? The reason I ask is that I cannot get "SELECT * FROM locations WHERE title LIKE '%".$input."%'"; The "SELECT * FROM locations" query only does give me the full table but using that input variable substitution (from … | |
I trying to sort an array ising php but this code is not working. can any body tell me whats wrong with this code, is my logic is right or wrong. I don't know much about Php as I am new to learning php <? php $a= array(12,5,78,10,63,11); $size=$sizeof($a); for($i=0;$i<=$size;$i++) … | |
I have two dropdwon box. First box has names of the states. Choosing a state will populate the second dropdown box that contains cities of that selected state. For all states city names are stored in mysql database table. now I am little confussed how to model the table and … | |
i have recently started using linx mint 13. have installed the LAMP package but i now have trouble creating the folders for the websites i want to develop. can i use the terminal to create the folders on the file system? | |
Hi, So I have a login system but when I create an account and activate it through email. It goes through but then the style.css does not apply so all the backgroung and images fail. So the link is like this. http://www.site.com/register.php?mode=activateusername=user&activationcode=D56gsjd and the html and all the rest doesnt … | |
<? $connect = mysql_connect("localhost", "adamf", "adamf123") or die ("Wrong password, jerk."); mysql_select_db ("adamf"); $insert="INSERT INTO product (product_id, product_name, product_type, product_brand, product_year) VALUES (1, 'Cyber', 1, 1, 2001), (2, 'Motive', 8, 1, 2005), (3, 'Oracle', 8, 2, 2005)"; $results = mysql_query($insert) or die(mysql_error()); $type="INSERT INTO producttype (producttype_id, producttype_label) VALUES (1, 'Heads'), … | |
Hi, I'm trying to do a list of news, but i only want today's news and news from the past what i don't want is future news(tomorrow,...). So i'm doing if the date <=$curdate, but future news appear anyway, can you help me, plz? <?php $curdate = date("d/m/Y"); $row_noticias = … | |
This is the error i get form my error_log on my server online PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /home1/zxx/public_html/admin/userindex/sms/sms.php on line 127 i looked in all of the code but can't find why that error. Here is the code, it's an sms app writing in php. … | |
i have created database for our site. but i wanted to know that how can i secure my website using session. | |
i am working on a web project which upload file on server, i am using uploadify for this. I have used this with wamp where it worked like a charm but when i tried in the server side it failed.. any suggestions. I have done many tricks but none of … | |
Hi With the code snippet given in the following post http://www.daniweb.com/web-development/php/threads/126361/csv-file-uploading-into-a-mysql-database I am able to import csv data into phpmyadmin. However, I am getting an error if csv data contains a text with apostrophe (‘) symbol (e.g. my book’s name is abc). Appriciate any suggestions to resolve this error. Thank … | |
function memory($user,$ayat){ sqlconnection(); $user = mysql_real_escape_string($user); $ayat = mysql_real_escape_string($ayat); if((checkmemory($user,$ayat)==0) || !(checkmemory($user,$ayat)==0)){ $sql="INSERT INTO `mark` ( `user_id` , `ayat` ) VALUES ( '".$user."', '".$ayat."' )"; mysql_query($sql); return $sql; } } function checkmemory($user,$ayat){ sqlconnection(); $user = mysql_real_escape_string($user); $ayat = mysql_real_escape_string($ayat); $sqlmemory="SELECT * FROM `mark` WHERE `user_id` = '".$user."' AND `ayat` =".$ayat; … | |
<?php session_start(); include "conn.php"; if (isset($_POST['submit']) && $_POST['billno']!='' ) { $bill = $_POST['billno']; $query = mysql_query("SELECT bill_no, tag_no FROM tbl_cargo_details WHERE bill_no='$bill' or tag_no ='$bill'") or die(mysql_error()); while ($row = mysql_fetch_assoc($query)) { if($bill == $row['bill_no'] || $bill == $row['tag_no']) { header("location:true.php?bill=$bill"); } else { header("location:false.php?bill=$bill"); } } else { ?> … | |
Hi. I am having trouble with this script: <?php $host="mysql.host.com"; // Host name $username="username"; // Mysql username $password="password"; // Mysql password $db_name="DB_NAME"; // Database name $tbl_name="table"; // Table name $myusername = $_SESSION['myusername']; // Session on login page, in a variable. // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or … | |
hi i want to create table in php but i dont know how many row are in database. but i want to show 2 records per row. please help me how can i do that ?? here is my code but it wasnt work as i desired it create i … | |
| hello i have website http://www.w3db.org Problem :: problem is that it cant load or load after 2 ot 3 minutes which is quite strange i do not know where is the problem script is OK so please somebody check it that the problem is with me or others user face … |
Hi. I wanted to make a page that I can update a table in a database. But for some reason, I get this error: ***Warning: mysql_query() [function.mysql-query]: Access denied for user 'a1092592'@'localhost' (using password: NO) in /home/a1092592/public_html/folder/file.php on line 10*** and this error: ***Warning: mysql_query() [function.mysql-query]: A link to the … | |
hi all im having a issue with non selected checkboxes when i select checkboxes and hit submit they go into the database ok but the checkboxes that have not been selected are adding 0 to the database code below: <form action="addeventusers.php?evid=<?php echo $evid; ?>&u=<?php echo $u; ?>" method="post"> user 1 … | |
Please anybody help me out in installing gearman php extension on windows xp. I have xampp 1.7.7 installed on my system and i have installed Cygwin, libevent-1.4.14b-stable and gearmand on my system. Please let me know what more is needed to install gearman-1.0.2 php extension. As when i run the … | |
# Heading Here # Please assist me on this one. I have two DB's, one keeps track of user and system activities and the other keeps track of only user activities. The purpose of the codes below is to first of all retreive all tables from the second DB. These … | |
Hi. I am having a problem with PHP. I got these lines of code: <?php include('Include Stuff') ?> <html> <center> <h1>Admin Login.</h1> <form action="(Action Script)" method="POST"> Admin Name: <input type="text" name="name" /><br /> Password: <input type="password" name="code" /><br /> <input type="submit" value="Login" /> </form> </html> And this: (the action script … | |
Sir Please suggest a way to compare values in a column of excel sheet so that if same values are appeared i can update using php I have a column named Name which stores Names of students,if same student entry is appeared i need to update Thanks | |
We all know how to open a mailbox using `imap_open`. Here the problem is i'm creating a maill system here. I'm not able to find to create a mail account with `imap/pop3` in `php`. Is it is possible ? Assume suppose my domain is www.studentmug.com. I want to create a … | |
Hi, I am trying to check if a certain username is in a session. This is what I have so far... <?php if ($_SESSION=='Djmann1013') { // Do the work here. } else { // Don't do anything :P } ?> But, when I test this, it does nothing. But when … | |
Hi Everyone, I have a foreach array that prints out images one per line. How can I print images out so I have 3 per line ? here is the code I am working with. if (count($friendDataRawArray) > 0) { foreach ( $friendDataRawArray as $id => $friend) { //$name = … | |
Hello First of all, I'm new to PHP, and also to Daniweb. I've been looking everywhere for some PHP code to skip to the next line every time my string ($description) has a period in it. So here's an example of what I want to achieve: Text: The car is … | |
Hi, I want to change this code as given 1 result. I don't need 10 line results. I just need 1 line result. When I tried to change 10 with 1 it doesn't work. Please help me about that. while( $row = mysql_fetch_array($query) ) { $id[] = $row['id']; } $id … | |
hi guys, i've been trying to get a work around for this: in a file structure like this: root: -----index.php (file inside root) -----template (folder inside root) -----user (folder inside root) -----products (folder inside root) -----config (folder inside root) i've been tryoing to use dirname(dirname(__FILE__)) inside a file in the … | |
This the form: <div style="border: 0px #000 solid; padding:0px 0 0 5px; width:auto;"><h3 align="center"><b>Job Seeker Application Form:</b></div></h3> <div id="container" class="ltr"><form name="cliform" method="post" action="cli_app_check.php" enctype="multipart/form-data"> <table width="100%" align="center"><tr><td> <table width="100%" align="center" cellpadding="0" cellspacing="10"><tr><td align="right">Title :</td><td width="16%"><select name="title"><option value="000">Select Title</option><option value="Dr.">Dr.</option><option value="Mr.">Mr.</option><option value="Mrs.">Mrs.</option><option value="Miss.">Miss.</option></select></td><td align="right">Surname :</td><td><input name="sname" type="text" id="sname"></td><td align="right">Other Names :</td><td><input … |
The End.