1,038 Posted Topics
Re: 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. | |
Re: [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 | |
Re: 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. | |
Re: Get jQuery ([url]http://www.jquery.com[/url]) and read through the documentation | |
Re: A) Don't make a thread with a vague title, B) What's the error? there are a lot of possible errors | |
Re: 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 … | |
Re: 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 … | |
Re: Why would you use Javascript to do this instead of just using ul/li's in your HTML? | |
Re: 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 | |
Re: A) Post your form B) [icode]if (strlen($_POST['query'] == 0 ) ) {[/icode] should be [icode]if (strlen($_POST['query']) == 0) {[/icode] | |
Re: [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. | |
Re: 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. | |
Re: [code]"SELECT * FROM participants WHERE participantID = '.$participantid.'";[/code] remove the periods between '.$participantid.' | |
Re: 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); … | |
Re: What are the two used for, or are they used to delimit the same things? | |
Re: Don't know, do [icode]echo mysql_error();[/icode] in between $getAll= and $rows = | |
Re: Aside from your scope issue you have 6 identical structs. Inheritance exists for a reason. | |
Re: Your query is failing. Try placing this after your query call [code=php] if (!$result) { die('Invalid query: ' . mysql_error()); } [/code] | |
Re: [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); … | |
Re: 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 | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: where is [icode]currentSize[/icode] coming from, it's not in that function. | |
Re: [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 … | |
Re: Is it named .htaccess on the server or is it named htaccess? The leading dot matters. | |
Re: [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 … | |
| |
Re: [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 … | |
Re: 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. | |
Re: $_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. | |
Re: [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> … | |
Re: 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. | |
Re: 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 … | |
Re: ... ... ... 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] … | |
Re: 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. | |
Re: 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 … | |
Re: Well for one, why are you using a heading generating script to generate an image when it uses web-safe font? | |
Re: 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 … | |
Re: In what way does it "not work". What are the values of the row (what is the exact value of `$row['website']` | |
Re: 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 > … | |
Re: 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 … | |
Re: [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 … | |
| |
Re: It's called [url=http://lmgtfy.com/?q=AJAX]AJAX[/url] (Let's see if I get berated for saying this this time.) | |
Re: 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. | |
Re: 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 … | |
Re: Does your mysql_query call return 0 rows or does it throw an error? | |
Re: 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 … | |
Re: 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] |
The End.