1,038 Posted Topics

Member Avatar for charbel007

Well php4 or php5 sessions are based on cookies so there is no concept of "copying the url" to duplicate the session which leads me to believe you are checking logged-in state based on a GET variable in which case the code you posted isn't the code that's being executed.

Member Avatar for charbel007
0
200
Member Avatar for Studio1023

[QUOTE=Studio1023;866148]Thanks for the info... I will look through online. I use Dreamweaver now but have not really looked into anything it offers in depth like Coldfusion. Could that be another possible tool I could use?[/QUOTE] Not unless you want to pay licensing fees. Coldfusion isn't free and open like PHP

Member Avatar for platinum8
0
224
Member Avatar for Akis2000

With the [icode]math.h[/icode](or cmath someone correct me on this) header you can use the [icode]floor[/icode] and [icode]ceil[/icode] functions if I remember correctly to round down and round up respectively.

Member Avatar for Akis2000
0
143
Member Avatar for coolmind259
Member Avatar for mail2saion
0
103
Member Avatar for welbyobeng

A) Don't make a thread with a vague title, B) What's the error? there are a lot of possible errors

Member Avatar for welbyobeng
0
107
Member Avatar for jakesee

Well when using file_get_contents a request is sent to the remote server with the User Agent as "PHP" which can be configured in php.ini. I believe the same holds true for cURL but a cURL request can be configured to customize the user agent. So yes, it does get logged …

Member Avatar for jakesee
0
104
Member Avatar for veledrom

Why do you keep adding extra parameters to mysql_connect? it only takes hostname, username, password. You're adding two usernames for no reason. You've also broken encapsulation by making a base class (DBprocess) too specific by entering into one table. There should be child classes which extend the base class that …

Member Avatar for ShawnCplus
0
97
Member Avatar for sunilsinha

Why would you use Javascript to do this instead of just using ul/li's in your HTML?

Member Avatar for Airshow
0
115
Member Avatar for liferentsus

I'm not exactly sure what you want to do, the two examples you posted are the same except for a newline after the <cat #> tag

Member Avatar for liferentsus
0
213
Member Avatar for genieuk

A) Post your form B) [icode]if (strlen($_POST['query'] == 0 ) ) {[/icode] should be [icode]if (strlen($_POST['query']) == 0) {[/icode]

Member Avatar for genieuk
0
2K
Member Avatar for nishantsharma

[QUOTE=tux4life;864884]You forgot to put the [ICODE]using namespace std; [/ICODE] instruction in your snippet :P[/QUOTE] [ICODE]using namespace std; [/ICODE] isn't required even if you're using things from the std namespace. It's only to make it less annoying so you don't have to type [icode]std::cout[/icode], [icode]std::cin[/icode], etcetera.

Member Avatar for tux4life
0
241
Member Avatar for hannahwill

It's a security feature on browsers, cross-domain AJAX isn't allowed and would be a big issue if it was. If you need to get data from another website use an AJAX call to call a local file which uses cURL or something similar to fetch the file.

Member Avatar for ShawnCplus
0
82
Member Avatar for jzimmerman

[code]"SELECT * FROM participants WHERE participantID = '.$participantid.'";[/code] remove the periods between '.$participantid.'

Member Avatar for ShawnCplus
0
76
Member Avatar for veledrom

I usually like to take the time and explain why its wrong but I'm lazy today so I'll just fix it. [code=php] <?php class DBconnection { private $host="localhost"; private $user="root"; private $password=null; private $database="classTest"; private $conn; private $db; private static $instance = null; private function __construct() { $this->conn=mysql_connect($this->host, $this->user, $this->password); …

Member Avatar for veledrom
0
373
Member Avatar for jondoughty
Member Avatar for jondoughty
0
112
Member Avatar for xmaddness
Member Avatar for xmaddness
0
151
Member Avatar for kiwihaha

Aside from your scope issue you have 6 identical structs. Inheritance exists for a reason.

Member Avatar for kiwihaha
0
153
Member Avatar for Tonkz

Your query is failing. Try placing this after your query call [code=php] if (!$result) { die('Invalid query: ' . mysql_error()); } [/code]

Member Avatar for Tonkz
0
198
Member Avatar for Noraini

[code] function myfunction() { a=document.form.objective.value; b=parseInt(a); c=document.form.topic.value; d=parseInt(c); e=document.form.coordination.value; f=parseInt(e); g=document.form.instructor.value; t=parseInt(g); h=document.form.audiovisual.value; i=parseInt(h); j=document.form.enjoy.value; k=parseInt(j); l=document.form.recommend.value; m=parseInt(l); n = (b+d+f+t+i+k+m); document.form.total1.value =n; a1=document.form.benefit.value; b1=parseInt(a1); c1=document.form.learnt.value; d1=parseInt(c1); e1=document.form.apply.value; f1=parseInt(e1); g1=document.form.aspires.value; t1=parseInt(g1); h1=document.form.share.value; i1=parseInt(h1); j1=document.form.motivate.value; k1=parseInt(j1); l1=document.form.asset.value; m1=parseInt(l1); n1 = (b1+d1+f1+t1+i1+k1+m1); document.form.total2.value =n1; a2=document.form.trainer2.value; b2=parseInt(a2); c2=document.form.trainer3.value; d2=parseInt(c2); e2=document.form.trainer4.value; f2=parseInt(e2); g2=document.form.trainer5.value; t2=parseInt(g2); …

Member Avatar for ShawnCplus
0
513
Member Avatar for coolmind259

A) [B]USE CODE TAGS![/B] This isn't your first post, that's not an excuse anymore. B) Get firebug [url]getfirebug.com[/url] and put [icode]console.log(Request.responseText);[/icode] right before the if block

Member Avatar for ShawnCplus
0
76
Member Avatar for Siberian

You might be able to achieve that with header() redirects (check the PHP manual for the header() function) But I wouldn't exactly recommend intentionally deceiving your users.

Member Avatar for chrishea
0
159
Member Avatar for serkan sendur

It's to solve the diamond inheritance problem where you have a base class, then 2 child classes then a 4th class that inherits from both of the previous classes. If the base class declares a function then there is ambiguity of that function in the 4th class. Declaring the 2 …

Member Avatar for serkan sendur
0
137
Member Avatar for genieuk

When you get a white page it usually means there was a fatal error and you don't have error reporting turned on. At the top of your script put [icode]error_reporting(E_ALL);[/icode] (Take this out once you put the site live, you don't want errors showing on your page when you're not …

Member Avatar for genieuk
0
136
Member Avatar for pczafer

where is [icode]currentSize[/icode] coming from, it's not in that function.

Member Avatar for pczafer
0
92
Member Avatar for JimD C++ Newb

[QUOTE=JimD C++ Newb;862447]Thank you for pointing out the error I didn't even see. Everything seemed to work properly the way that I had it before, so I guess my question is...is it just good practice to close them in the reverse order you opened them, or does it really make …

Member Avatar for ShawnCplus
0
96
Member Avatar for coolmind259

Is it named .htaccess on the server or is it named htaccess? The leading dot matters.

Member Avatar for BzzBee
0
103
Member Avatar for moonie9

[QUOTE=itisnot_me;862005]this is an easy but hard fix. If you are using the session_register("name"); You need to upgrade it to the $_SESSION['name'] = "1";. that is if you built the site yourself. if this is a packaged software you might have to see if they have an updated version. if you …

Member Avatar for moonie9
0
190
Member Avatar for itisnot_me
Member Avatar for ShawnCplus
0
77
Member Avatar for zunaidius

[QUOTE=cwarn23;860562]If you mean transferring data from your localhost to your webhost on scheduled times then I would suggest downloading and using crone for your localhost server (not to be mixed with crome or chrome). With crone, you have the ability to schedule command line events which in this case you …

Member Avatar for ShawnCplus
0
120
Member Avatar for Pierre9

The implementation of the Javascript interpreter is really up to the browser. Technically nothing should be garbage collected until a page is closed because of javascript's lexical scoping but as I said its up to the browser. No, there is no way to explicitly destruct an object.

Member Avatar for ShawnCplus
0
176
Member Avatar for kssi89

$_SESSION is an array, you can use two separate indexes for user authentication and the cart ie., [icode]$_SESSION['user'][/icode] for the login and [icode]$_SESSION['cart'][/icode] for the cart. With sessions this is usually called namespacing if you want to research it on your own.

Member Avatar for ShawnCplus
0
90
Member Avatar for DealthRune

[QUOTE=DealthRune;858313]I made this JavaScript that password protects a page. But the password you type in is completely visible! I want it so that the password are those black dots for each letter.... If anybody gots anything, please post it here, thx. Oh yea, here is the script [icode]<HTML> <BODY> <SCRIPT> …

Member Avatar for ShawnCplus
0
131
Member Avatar for marjan_m

Take a look at the google documentation, it's fairly in depth. It should be right around the same page you used to sign up for the API key.

Member Avatar for marjan_m
0
133
Member Avatar for cloudedvision

If it's just dying with no message you might want to check to see if you have your error_reporting ini value set to something other than E_ALL (development only, don't turn this on live). Also, consider using braces around your conditions even if it's only one statement. It disambiguates the …

Member Avatar for cwarn23
0
116
Member Avatar for brunope

... ... ... holy crap what the heck are you doing? You just crushed an ant with Mt. Everest. If you're trying to remote the $ [code=php] $string = str_replace('$', '', $price); [/code] In regular expressions $ is not a reference. It means End of Line. so the regex [icode]s$[/icode] …

Member Avatar for almostbob
0
123
Member Avatar for pt_solar

That looks suspiciously like a homework question. Perhaps you should give a shot at coding it a bit yourself before we give you a hand.

Member Avatar for VernonDozier
0
233
Member Avatar for danishbacker

Actually, 1 and 3 would be combined since the database would be the store for the binary tree. A binary tree works like this [code] A / \ B C / \ / \ D E F G [/code] Where each letter represents a node. Each node has a parent …

Member Avatar for danishbacker
0
1K
Member Avatar for baudday

Well for one, why are you using a heading generating script to generate an image when it uses web-safe font?

Member Avatar for baudday
0
1K
Member Avatar for genieuk

Personally I've never picked up a book on PHP and I wouldn't really recommend it. Books take too long to update and are most likely contain outdated information by the time they're published. Especially when dealing with the web. There will be no better source of information for you than …

Member Avatar for BzzBee
0
122
Member Avatar for zynap

In what way does it "not work". What are the values of the row (what is the exact value of `$row['website']`

Member Avatar for ShawnCplus
0
4K
Member Avatar for ADVAD

Note: This is beating the crap out of the problem and will be SLOW for large files. [code=php] $file = file('somefile'); $FirstName = $_POST['FirstName']; $LastName = $_POST['LastName']; $Email = $_POST['Email']; $line_count_pre = count($file); $content= $FirstName . '|' . $LastName . '|' . $Email; $file[]=$content; $line_count_post = count(array_unique($file)); unset($file); if($line_count_post > …

Member Avatar for ShawnCplus
0
250
Member Avatar for engg.gaurav

A) I'm not sure why you don't want to use a session. B) So you're not sending a string too long you could base64encode a json_encoded array and send it through GET. ie., [code=php] <?php $some_array = array('blah', 'blah2'); $some_arrayGET = base64_encode(json_encode($some_array)); ?> <a href="somepage?some_array=<?php echo $some_arrayGET ?>">BLAH!</a> [/code] Then …

Member Avatar for ShawnCplus
0
50
Member Avatar for ero100@live.com

[QUOTE=chrishea;855486]A few observations: 1. When you post code, you should use [code] tags to have it format properly. 2. You don't need the <html> <head> and <body> statements. PHP takes care of that. 3. $subject on line 16 isn't defined (at least in what you have shown us). 4. The …

Member Avatar for cwarn23
0
149
Member Avatar for hardcore
Member Avatar for omoabobade

It's called [url=http://lmgtfy.com/?q=AJAX]AJAX[/url] (Let's see if I get berated for saying this this time.)

Member Avatar for ShawnCplus
0
56
Member Avatar for timos

You could use a CGI script to generate html. There is the [url=http://www.gnu.org/software/cgicc/]cgicc library[/url] for building CGI apps that might help.

Member Avatar for ShawnCplus
0
58
Member Avatar for darkagn

In all browsers that's how it is supposed to work. Sessions are saved to cookies which either expire after a certain amount of time or after a user closes their browser. There would be absolutely no way to tell the difference between them opening a new tab or just refreshing …

Member Avatar for nutty2chat
0
237
Member Avatar for shasha821110
Member Avatar for ShawnCplus
0
87
Member Avatar for Curtain51

Give this a shot switch (choice) { case '1': { outputFile.open("C:\\Users\\Owner\\Desktop\\Documents\\C++ Projects\\Assignments\\Serendipity\\Main Menu Screen\\Main Menu Screen\\Cashier Screen.cpp"); if (!inputFile) cout << "Error Opening file.\n"; break; } case '2': invmenu(); break; case '3': reports(); break; case '4': cout << "\n\t\t\tEnding Program.\n"; break; } If you have more than one statement, excluding …

Member Avatar for Curtain51
0
189
Member Avatar for gagan22

that's way over-complicated the function. You don't need to pass the form and you don't need if-blocks [code=javascript] function validate() { return confirm("Are you sure to delete these details from database?"); } [/code]

Member Avatar for mail2saion
0
148

The End.