The PHP Group Computers & Internet - Page 3 - Recent Questions, Troubleshooting & Support

0helpful
2answers

I keep getting error for line 15

There's too much apostrophes in define('EMAIL_SUBJECT', ... Is this line 15?
Change it to define('EMAIL_SUBJECT', "Enquiry from 'MMSWEETS'");
11/17/2009 10:21:29 AM • The PHP Group... • Answered on Nov 17, 2009
0helpful
1answer

Been on facebook most of the morning daughter came

Reboot your computer. The cookies will be reset.
9/21/2009 5:19:55 PM • The PHP Group... • Answered on Sep 21, 2009
0helpful
1answer

How to place MySQL database on host

my sql data can be transfered using the export options within mySQL.

# mysqldump -u username -ppassword database_name > FILE.sql

http://www.clockwatchers.com/mysql_dump.html

goto Cpanel of the remote host and
select import and select a the file with the table contents & data.

Regards
GeWiz.
6/16/2009 5:26:02 PM • The PHP Group... • Answered on Jun 16, 2009
0helpful
2answers

Php counter

You might want to note that this is not the most effective manner of creating a counter in PHP. On a few of my websites, I find it is much more effective to simply create a text file, eg. counter.txt and have PHP read that every time the page is loaded, instead of running a MySQL query. Then, have PHP also update the counter.txt file by adding 1 to the number already listed in the file and read to the user.
5/9/2009 11:02:14 PM • The PHP Group... • Answered on May 09, 2009
0helpful
1answer

Clarification

are you saying you're switching from a session variable to a cookie?

delete the cookie altogether by setting the expiration to a time in the past (negative value). don't forget that you'll then have to reload a page in order to reread the cookie data.

so if you have a cookie with a logged_in value = true, and you set it to logged_in value = false, you're still logged_in = true, until you reload that page (or another page) and it rereads the cookie data and now determines that logged_in = false.

make sense? write the logged_in=false to the cookie, then force a url redirection to reload the page is my suggestion.
4/4/2009 12:30:52 PM • The PHP Group... • Answered on Apr 04, 2009
0helpful
1answer

Dissappearing spaces when html page handles database data

Mark, it sounds like when you are displaying the data back to check and edit the data, you are not including it inside of quotes.

example:

//query to grab example data
$query="select name,salary from employee";
$result=mysql_query($query)
or die("query failed!");

printf("<input type='text' value='%s'>",mysql_result($result,0,"name"));
printf("<input type='text' value='%s'>",mysql_result($result,0,"salary"));

notice in my example the "value" argument of the "<input>" command the %s for your variable is contained within single quotes.
4/4/2009 12:13:32 PM • The PHP Group... • Answered on Apr 04, 2009
0helpful
1answer

Retrieving and displaying logged in users info

you had not provided complete detail that if you are having database for username or you want to fetch username from 'email providing site' in which your user created his account.if you are trying for second option,It is almost not possible coz any of the email providing site will not exchange personal detail of any of his acc holder.
if you are trying first option,session in php can help you.you can store username in a session variable n then u can access them on any page if session is not destroyed or expired.
3/26/2009 10:24:53 AM • The PHP Group... • Answered on Mar 26, 2009
0helpful
1answer

Php assigning value to variables and posting

You can use a session variable.
First use session_start().
Then you can crate a session variable by simply setting the appropriate member of the $_SESSION or $HTTP_SESSION_VARS (PHP < 4.1.0) array
Example.

session_start();

$_SESSION["number"] = 10 ;

echo $_SESSION["number"];

You can call it whenerver you want.
remmember to start session on all the pages where you use the variable.
3/17/2009 5:00:27 PM • The PHP Group... • Answered on Mar 17, 2009
0helpful
2answers

Logout script with session management in php5

just create a logout.php script with the following

<?php
session_start();
session_destroy();

header("Location: index.php");
?>

Have your logout button/link/whatever just open that page which connects to the session with session_start. Session destroy does exactly what it sounds like... it unsets all session data and tells the server to end the session. The header request then just re-directs the user to whatever page you want after (just change out index.php)
3/17/2009 1:25:42 PM • The PHP Group... • Answered on Mar 17, 2009
0helpful
1answer

PHP issues with ''''... Please help!!!

Hello.

If you want PHP to use quotation marks you have to seperate them from the ones that start the expression by a backslash(\).

Here are two examples:
WRONG: echo "A "QUOTE" AND SOME TEXT";
RIGHT: echo "A \"QUOTE\" AND SOME TEXT";

or

WRONG: echo 'A 'QUOTE' AND SOME TEXT';
RIGHT: echo 'A \'QUOTE\' AND SOME TEXT';

I hope this helps.

Kind Regards,
Wilhelm@X-ex.info
3/6/2009 5:21:43 PM • The PHP Group... • Answered on Mar 06, 2009
0helpful
1answer

Logout problem

Hey,
what code are you using to destroy the session?

should look something like this
e.g. getting rid of email session
<?php
unset($_SESSION['email']);
?>
2/6/2009 12:19:42 AM • The PHP Group... • Answered on Feb 06, 2009
0helpful
1answer

Database talks to code but code won't talk to database

Make sure you are connecting to the database,then just before you call your sql to insert use an echo statement to display the sql and check it for syntax:-
$sql = 'insert into table1 values('.$no.','.$no.',"block","'.$value3.'", "'.$value4.'")';
echo "SQL ==>" STARTOFSQL<br>".$sql." ENDOFSQL<br>";
1/19/2009 6:39:09 PM • The PHP Group... • Answered on Jan 19, 2009
0helpful
1answer

EMIAL FOR COFFEECUP FORM BUILDER WITH PHP

listen problem is realeted to hosting
really go to this website
you can buy one great private email of your own
http://www.jdoqocy.com/click-3245371-10368018

11/30/2008 1:15:01 PM • The PHP Group... • Answered on Nov 30, 2008
0helpful
2answers

Echo PHP

Print outputs a single string, echo can output multiple strings. (It's in the help file.)
11/26/2008 8:56:12 PM • The PHP Group... • Answered on Nov 26, 2008
0helpful
2answers

CGI PHP

11/26/2008 8:49:16 PM • The PHP Group... • Answered on Nov 26, 2008
0helpful
1answer

Integrating JavaScript within PHP....

If you're trying to do this with PHP, you might be more successful creating an initial page with the buttons that should be enabled at the start (New, Update, Delete), and then create a sub-page that displays a different form depending on the action the user selected previously. This way, the user only sees the buttons relevant to his/her current action. Here's some beginning code to help you out:

<?php

$action = $_POST['action'];

if($action == 'new')

{
//display the form for creating a new conference leader
}

else if ($action == '$update')

{
//display the form for updating a conference leader
}

et cetera.


Each sub-form would be processed by a third-level page (e.g. handle_create.php, handle_delete.php, etc.)
10/5/2008 1:20:04 AM • The PHP Group... • Answered on Oct 05, 2008
0helpful
1answer

Php cookie problems

can u give me the error that is shown when you try to use cookies ? or it just doesn't work ?
9/10/2008 10:38:43 PM • The PHP Group... • Answered on Sep 10, 2008
0helpful
1answer

PHP Login Problem

We'd have to see the relevant code (not all of it, just the relevant part) to even guess at the problem.
9/10/2008 4:11:36 PM • The PHP Group... • Answered on Sep 10, 2008
0helpful
1answer

PHP Guestbook Error

There's supposed to be a file named LouisSahagunGuestbookdb.php in the /home/content/p/l/a/planet9/html/LouisSahagun/ directory and there isn't any.
9/10/2008 4:07:35 PM • The PHP Group... • Answered on Sep 10, 2008
0helpful
1answer

PHP Array Question

<?php
$color = array("red", "blue", "yellow");
foreach($color as $key => $value) {
echo $key . " " . $value . "<br>";
}
?>

More info: http://www.phphelps.com/7_Creating_and_looping_array_in_PHP.shtml
9/10/2008 11:40:38 AM • The PHP Group... • Answered on Sep 10, 2008
Not finding what you are looking for?
The PHP Group Logo

77 questions posted

Ask a Question

Usually answered in minutes!

Popular Products

Top The PHP Group Computers & Internet Experts

Rob Hill
Rob Hill

Level 3 Expert

1483 Answers

Nikole Brown
Nikole Brown

Level 2 Expert

124 Answers

Syed Bilal
Syed Bilal

Level 3 Expert

252 Answers

Are you a The PHP Group Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...