39,326 Topics

Member Avatar for
Member Avatar for JBLDW

What is the purpose/point of [B]echo[/B], [B]endif[/B], and [B]return[/B]? Also, whilst on this subject, why should I enclose values in [B]" "[/B] when enclosing them in [B]' '[/B] works just as well? I know [B]echo[/B] can be used in place of print, but why and when should I use [B]echo[/B] …

Member Avatar for JBLDW
0
154
Member Avatar for trellonoob

Hey guys I'm hoping someone can help me out. I have an admin page with the ability to update existing data from a table, I have textboxes being created for each record(this works) but its the submit/update script that doesnt work. What it does right now is nothing, i hit …

Member Avatar for nuttyniall
0
292
Member Avatar for CFROG

I'm trying to output the results of an array to a table. To be more specific, I'm trying to output pictures ... let's say 5 pics per row for example. Below each pic I'd like to display a few options like delete, etc. I'm not looking for the answer, just …

Member Avatar for ijn1
0
282
Member Avatar for xagutxu

Hi, everybody: I have written an include file in my php file "main.php", with and include "ip.php", which is: <?php function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])){ //check ip from share internet $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ //to check ip is pass from proxy $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else{ $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?> …

Member Avatar for xagutxu
0
84
Member Avatar for mithesh

hi I need to display date which is stored in database and need to format and display on web page the current format is (Y-m-d) I need to display as (d-m-Y); On the web page pls anybody help me with the php script I will paste my code: [CODE]<?php $d=$_POST['sdd']; …

Member Avatar for antonyruban
0
8K
Member Avatar for lttleastig

Hello guys I wanna make a registration page for a game which uses SQL DB does anyone know how to encrypt a pass so that it ends up like this? [CODE]0x7BF1EA5EBADD9D7DD2D43E25ABEBCD100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000[/CODE] btw the column that the pass is sored in is BINARY that converts into "999momo999" i think its md5 …

Member Avatar for lttleastig
0
112
Member Avatar for lttleastig

[CODE]Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\reg.php on line 3 [/CODE] it just comes up with that and this is the only code i have [CODE]<?php session_start(); mssql_connect("Philip-Pc\DRAGONICA", "sa", "123456"); ?>[/CODE] any ideas?

Member Avatar for lttleastig
0
73
Member Avatar for sujitrulz

Hi, Can any body provide me some code reference regarding,how to limit execution of a function to a registered user everyday for n number of times.Like user can only send 20 mails everday.so allowing execution of mail function for only 20 time everday and resetting the counter the next day …

Member Avatar for pritaeas
0
79
Member Avatar for altarek

How to Get Results in the Word file? Or how to print the results in the Word file? using php

Member Avatar for blocblue
0
98
Member Avatar for Sarao

I am using the following codes to update my SQL records but these arent working. Please help me. [B]HTML To select which Data to update[/B] [CODE] <?php $connect = mysql_connect("127.0.0.1", "root", "") or die ("Error , check your server connection."); mysql_select_db("shipments") or die("cannot select DB"); $sql="SELECT * FROM info"; $result=mysql_query($sql); …

Member Avatar for Sarao
0
98
Member Avatar for Progr4mmer

this is supposed to log the ip's of people connecting to my site but it wont work help? [CODE]<?php $username="****"; $password="*****"; $database="ipconnect"; $ip=@$REMOTE_ADDR; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO ip VALUES ('$ip')"; mysql_query($query); mysql_close(); ?>[/CODE]

Member Avatar for pritaeas
0
109
Member Avatar for anita_86

Hi again!! I am stuck into a new problem.I have a invoice form with regular fields in it and when the user press the print button, I want to print it out in desired formatting like, company name, address etc. at the top of the page, and so on. Can …

Member Avatar for anita_86
0
83
Member Avatar for CanadianGSX

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'] = …

Member Avatar for CanadianGSX
0
100
Member Avatar for ON_Jtharpe

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 …

Member Avatar for codewall
0
151
Member Avatar for anita_86

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) …

Member Avatar for codewall
0
110
Member Avatar for ilvista

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(): …

Member Avatar for ilvista
0
3K
Member Avatar for reco21

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="' . …

Member Avatar for pritaeas
0
189
Member Avatar for bbinais

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" …

Member Avatar for pritaeas
0
162
Member Avatar for lamiv007

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.

Member Avatar for drstorm
0
1K
Member Avatar for ilikesimple

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. …

Member Avatar for ilikesimple
0
150
Member Avatar for bestman1985

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 …

Member Avatar for pakistanman
0
67
Member Avatar for Nahiyan

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 …

Member Avatar for Nahiyan
0
204
Member Avatar for itisnot_me

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" …

Member Avatar for ana10192000
0
102
Member Avatar for ceeandcee

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; …

Member Avatar for zizuno
0
81
Member Avatar for phouse512

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 …

Member Avatar for Shanti C
0
152
Member Avatar for airick10

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 …

0
94
Member Avatar for zizuno

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 …

Member Avatar for nuttyniall
0
94
Member Avatar for JZM

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 …

0
81
Member Avatar for ddellostritto

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 …

Member Avatar for nuttyniall
0
586
Member Avatar for nquinlan

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 …

0
93

The End.