39,316 Topics
| |
Here's the code: [code] if ($result) { if ( $num_rows > 0 && $type = 1 ) { session_start(); $_SESSION['login'] = "1"; $_SESSION['loginname'] = $row['NOM']; $_SESSION['centreAFB'] = $row['CENTRE']; header ("Location: xxxxx.php"); } else if ( $num_rows > 0 && $type = 2 ) { session_start(); $_SESSION['login'] = "1"; $_SESSION['uname'] = … | |
Hey guys I am trying to create a login that checks for a password in a mysql database. I have just started picking away at this and have no clue if I am even close. If I am not even close I don't need someone to wast there time holding … | |
Hi!! I have a simple script of displaying client work history in following manner: [CODE]<?PHP $query1=mysql_query ("SELECT existing_clients_work_history.history_description, existing_clients_work_history.history_history, client_master.client_name FROM existing_clients_work_history INNER JOIN client_master ON existing_clients_work_history.client_id=client_master.client_id"); if(mysql_num_rows($query1) > 0) { echo "<table align='center' border='0' width='1000'>"; echo "<tr class='style1' align='center'> <td>Client Name</td> <td>Work Description</td> <td>Work History</td> </tr>"; while($row1=mysql_fetch_array($query1)) { if($row1!=0) … | |
hi I'm having trouble with php and mysql I'm getting this error [CODE] [Sun Jan 30 17:43:40 2011] [error] [client 127.0.0.1] PHP Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /var/www/t/view_tg.php on line 29, referer: http://localhost/t/ [Sun Jan 30 17:43:40 2011] [error] [client 127.0.0.1] PHP Warning: mysql_query(): … | |
Hello. I've set up pagination for my results. I do this with a class. I also have pretty urls with mod_rewrite. I'm wondering how to echo the urls for the paginated data. Currently I have this below for the links. [CODE]$links .= ' ' . $prefix . '<a href="' . … | |
hi, this is my php code i need pagination for this page.. help me please.... [CODE=php] include('connection.php'); ?> <!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" /> <meta http-equiv="Expires" content="Wed, 01 Jan 2020 00:00:01 GMT" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Script-Type" content="text/javascript" … | |
Hello, Can anyone help me embed a .mht file into a php page? I don't want it to be downloaded, but visitors should be able to browse that mht file. | |
Hi I am working on a website that users can use to create their own blogs. But I have hit a problem. Whenever I try to create a new file with the members username in. The rest of my script works perfectly. Can anyone see a problem with my code. … | |
Hi Friends I have taken linux web hosting from web hosting company in pakistan named [url]www.700hosting.com[/url] I am trying to install Joomla though the cpanel wizard. It is asking me the database username and password can some one tell me how will i get the database username and password secondly … | |
I have one MySQL database field which saves comment from users. Some comments have new lines but when I try to use PHP to display the contents of the database, the new lines are ignored. I know about nl2br() but I guess it will not work as my users will … | |
ok so i am including a html file that has a css file within it. but when i include it, it breaks the relative css location. is there a way before i include the html file that i define the relative area. example include("admin/template"); html file <link href="css/style.css" rel="stylesheet" type="text/css" … | |
This page works in IE http://www.ourhometown.ca/index.php in that the links on the left hand stories are not blue on the purple. But the smae page in Firefox is off...it uses the default blue and purple links. Here is my code <!--IN Style section --> #secondary_title2 { margin: 0.2em 4; padding:0px; … | |
Hello all, Today I received this as my error: Parse error: syntax error, unexpected T_STRING in /home/a8712935/public_html/admin_members.php on line 60 I've looked all over the internet but I can't find a solution to my problem. There is nothing wrong with that line, but I think it is a problem with … | |
I have a mysql table of say 20 records. I want to make a calculation to records 19 and 20 (add, subtract, multiple, divide, etc..) on the web page into a separate variable (not in SQL - variable 21) for each table row. How would I re-create that page sorting … | |
Basically I have to create a website for this community project our class in school is doing. It is coded in entirely php and html because I hate writing javascript. Cut to the chase, there is a photo gallery and a semi-secret log in that you can log into for … | |
Hey, Were I am stuck is with the jquery I have a form that is done in a form class and when an option is selected from the dynamically populated drop down menu I would like it to fill in the text boxes so they can be edited. I currently … | |
Hi everyone! I'm dealing with an online test that has 100+ questions and I would like a way to: a) turn all $_POST into $_SESSION automatically b) clean the data c) encode it a) I found this but it makes the form fail [CODE] if(isset($_POST) { foreach ($_POST as $key … | |
I'm trying to find a way to find the URL of an external HTML document when it embeds an image generated by PHP. So for example I would want the following to happen if these two documents occurred. [B][url]http://example.com/index.html[/url][/B] [CODE=HTML] <img src="http://otherplace.org/image.php" /> [/CODE] [B][url]http://otherplace.org/image.php[/url][/B] [CODE=PHP] header('Content-Type: image/gif'); readfile("test.gif"); $thelocation … | |
Hai I'm new to the joomla. I want my .php file execute with in joomla framework how is it possible. any one can solve this problem. Please Thanks Magendiran.S | |
Hi, here is my code so far: [CODE]<?php //List files in chosen directory $dir = opendir("uploads"); while ($entryName = readdir($dir)) { $dirArray[] = $entryName; } closedir($dir); $indexCount = count($dirArray); echo "$indexCount files <br />"; for($index=0; $index < $indexCount; $index++) { if ($dirArray[$index] != "." && $dirArray[$index] != "..") { $type … | |
i am writing a php code that displays text from a database. how would i make the text auto break `<br />` after a certain amount of chars? please help asap. thanks | |
So heres my issue... I am a student studying php and as a project am making an online php phonebook. It is database driven, and currently I am having issues with the delete page. the code for this is below and the website is online and said page can be … | |
The issue I am having is the following: Table1.FieldA is unique where as the Table2.FieldA field is not. When I run the following: SELECT Table1.Numbers, Table2.Numbers FROM Table1, Table2 WHERE Table1.ID = Table2.ID I get mutiple records like so: ID Name Numbers 125 John Doe 555, 556, 557 125 John … | |
Hi mates, I have a php page called "get_http_vars.php" that's hidden and not browsed in browser and only used to receive HTTP GET response variables from remote server. The problem the value of $_SESSION['id'] is empty when the HTTP GET variables are received (I mean when the page gets response … | |
Hello! I am trying to understand how i could make a profile page for each of my members. They all got an unique folder and i need to make something for the index. I was thinking...can i get the last word in [url]www.example.com/u/user22[/url] and compare "user22" to the $_session['username'];, and … | |
hello there, i'm currently studying php and i have no idea about some codes im trying to learn how to compute a total amount that i called from a database its like this i call this data from a database using SELECT * FROM Item Price book 5.00 pencil 3.00 … | |
Hi, I've made a form and it can send an e-mail with the text the person filled out. But now I'm trying to do so the person can upload a file and that will be included in the e-mail as an attachment. I think the problem is that I don't … | |
| I want to get details of user when he registers with my website for security reasons. I need ip and date and time I guess. Is there anything else I need to cache while registering? How to get ip,time and date? And time will be in which timezone? I want … |
Hello, We have a customized service desk script which makes use of send-mail to send out emails. But we have had an error with a regular expression function preg_replace for quite a while now. The original developer has left the organization and I am trying to take over but its … | |
can anyone help me out. why this code is not working? i want that whatever date is in requst ship field add 10 days in that and show that in next filed cancle ship field.can anyone help me out. [CODE] <? $a = uniqid(); $b=$a; $d=date("m-d-y"); function data_copy() { $r_s_d … |
The End.