450 Posted Topics
Re: BTW: There's nothing wrong with opening a db connection at the top of the script, leaving it open for the rest of your queries and then closing it at the end of your script. It a lot less messy and you are a lot less worried about juggling connections. | |
Re: try this one [URL="http://www.xploredotnet.blogspot.com/2007/08/remove-white-space-in-string-using.html"]http://www.xploredotnet.blogspot.com/2007/08/remove-white-space-in-string-using.html[/URL] | |
Re: OK, so the script works. I think it has something to do with the syntax within the file, let's debug. replace line 225: [CODE=php] $qry = mysql_query($query,$conn); [/CODE] with [CODE=php] $qry = mysql_query($query,$conn) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno($conn) . … | |
Re: This explains many options for submit buttons [URL="http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html"]http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html[/URL] | |
Re: [QUOTE=cyberjorge;633049]I'm sure this has been done[/QUOTE] Give me an example and I'll show you how it can be stolen. | |
Re: [CODE=php] <? $objtest = new Test(array('Hello', ' ', 'World')); $objtest->echoArrayA1(); $objtest->echoArrayA2(); class Test { var $TestArray = array(); function Test($inputArray) { $this->setTestArray($inputArray); $this->Display(); } function Display() { foreach($this->TestArray as $value) { echo $value; } } function setTestArray($inputArray) { if(is_array($inputArray)) { $this->TestArray = $inputArray; } } function echoArrayA1() { $a = … | |
Re: What kind of functionality do you want it to have? | |
Re: I don't think I ever seen mysql_fetch_array used without some type of loop. How are you specifying which row of data you want to display in the url? This is how I would probably do it. [CODE=php] <?php include("auth_user.inc.php"); // authrization page $uname=$_SESSION['user']; // logged user name $connection=mysql_connect("localhost","root"," "); mysql_select_db("userrecord",$connection); … | |
| |
Re: [QUOTE=harrence;630759]SELECT * FROM artists_details JOIN attendance WHERE artists_details.ethnicity='maori' AND attendance.date >= '2008-06-01' AND attendance.date <= '2008-06-20'[/QUOTE] try [CODE=sql]SELECT DISTINCT * FROM artists_details JOIN attendance WHERE artists_details.ethnicity='maori' AND attendance.date >= '2008-06-01' AND attendance.date <= '2008-06-20'[/CODE] | |
Re: Ya, tried it and got the same thing you got. Just cause it's posted somewhere certainly doesn't mean that it works. Usually whenever I see something like this it is a <ul> with nested urls that is then modified by js and css to create a menu, I've never heard … | |
Re: Like this? [code]list($hrs, $mins) = explode(":", $time); $mins += $hrs * 60; $endresult = $mins/5; echo $endresult;[/code] | |
Re: Ya, I would suggest that you go and mess up a couple times on some smaller items before taking this on, and be prepared for a lot of frustration and patients. | |
Re: How much freedom do you have with this 3rd party shopping cart, cause I think that there is only one way of really knowing if the product was purchased and that is by querying the database after the purchase is made, which I think would need to be done on … | |
| |
Re: you could try: [CODE=php] str_replace(" ", "\t" $string); [/CODE] | |
Re: try this [CODE]CONCAT( UPPER( SUBSTRING( colname, 1, 1 ) ) , LOWER( SUBSTRING( colname, 2 ) ) )[/CODE] | |
Re: This should help [URL="http://us2.php.net/manual/en/ref.filesystem.php"]http://us2.php.net/manual/en/ref.filesystem.php[/URL] | |
Re: right, because you are submitting it as an array and trying to enter it directly in the db that way. When you say [CODE] $array = array("val1", "val2"); echo $array; [/CODE] Your output will be just "array". The following will process the array and create a comma separated list of … | |
Re: For ideas I would start somewhere like this [URL="http://topmilitarysite.top-site-list.com/"]http://topmilitarysite.top-site-list.com/[/URL] or [URL="http://www.history.army.mil/websites.htm"]http://www.history.army.mil/websites.htm[/URL] just to help you brainstorm. | |
Re: [CODE]$this->hash->add($entry['key'], $entry['value']);[/CODE] try getting rid of this-> on line 39 so all you have is [CODE]$hash->add($entry['key'], $entry['value']);[/CODE] and getting rid of $this-> on line 54 | |
Re: and delete line number 10. | |
Re: as long as they are spaced by the " " character, yes. and if the number of values is unknown, you could also assign them directly to an array like so [CODE]$alpha = "11 22 33 44 55 66"; $array = explode(" ", $alpha); /* Then you will have $array[0] … | |
I am a seasoned PHP/Postgres/AJAX developer and would like to get back into ASP.NET development which I haven't touched since I graduated in 05(v1.1). Everywhere I look I find tutorials that include GUIs and wizards and that is not really the way I like to do things. I don't need … | |
Hi, Name: Rob Age:30 (Yeah, you'll be there one day.) Most of my experience is in php/postgres/ajax development but I want to expand my knowledge in other languages as well as offering advise to those in need and hope to accomplish some of that here at DaniWeb. | |
Re: If I may, I recommend using PHPMailer which you can find here [URL="http://phpmailer.codeworxtech.com/"]http://phpmailer.codeworxtech.com/[/URL]. This is an amazing class which I have worked with many times and you will find documentation on their website as well as examples in this downloaded zip file. Here you will see that you actually define … | |
Re: Likewise, I would recommend going with a server side script for this. To make a javascript authentication function even remotely secure will be 3 times as tricky. You understand that I can view your javascript right. Even if you have a function that redirects to another page and then back … | |
Re: [code]<script language="javascript"> function toggledivs(class, content) { var divs = document.getElementsByTagName('div'); for (var i = 0; i < divs.length; i++) { var div = divs[i]; if (div.className == class && trim(div.innerHTML) == content && div.style.display != "none") { div.style.display = "none"; } } } function trim(string) { string = string.replace(/^\s+/,""); return … | |
Re: Most of the WYSIWYG Editors that I see require activeX which requires IE but I know that some claim to be cross browser compatible. I would go to a website that offers scripts like hotscripts.com and search for "WYSIWYG editor" and you will probably find a couple that you can … | |
Re: And you need an action attribute in you opening form tag. ex. action="survey3.php" | |
Re: [QUOTE=insauciant;624974]hey u all code master...plzz help me...i need complete javascript code whichlist all files[/QUOTE] was that which lists or wish list? I think you are looking for [URL="http://www.daniweb.com/forums/forum24.html"]JSP[/URL] | |
Re: Also make sure that you are clearing all browser cache. | |
Re: ya, you need to own that domain before you can do anything with it. | |
Re: It would help to have some sample code but I would assume that your dd list looks something like this [CODE] <select name="selCountry"> <option value="24">Country Name 1</option> <option value="25">Country Name 2</option> </select> [/CODE] in this case in a post $_POST['selCountry'] would equal the selected "value" of the dd list and … | |
Re: Wow, another lesson learned in the forums | |
Re: if what you mean by bypass is ignore, this is how you would do it. [CODE]<script language="javascript" type="text/javascript"> /* if (top.location != location) top.location.href = document.location.href; */ </script>[/CODE] | |
Re: The only way that I know of how to do this is to provide an iframe that has the other site nested within it. [CODE]<iframe style="border-width:0px;" name="frame1" height="100%" width="100%" src="http://www.anirrelevantiste.com/withareallyuglyURL.htm"></iframe>[/CODE] This is pretty much how your domain registrar does domain masking and it does work [B]but[/B] anybody with any programming … | |
Re: is it possible that mysql_num_rows($result) is returning more than 1? | |
Re: I'm still showing [CODE]die("Error with database".);[/CODE] on line 17 which is keeping anything from being displayed. it should be [CODE]die("Error with database.");[/CODE] | |
Re: the phpmailer class offers an error string upon failure which sometimes can be helpful. If that doesn't tell you much there is a variable inside the "class.smtp.php" file which can be toggled on and off to display errors or not which will tell you exactly where the smtp process is … | |
Re: two things: First: $_FILES['file']['type'] comes from the browser which is not reliable. I would take the content of the file and then validate it against an open source php sql validator. if that comes back false then reply back to the user that the syntax is not correct. Second: I … | |
Re: Are you looking for a standard html form submission or an ajax application? | |
Re: Declare all of your variables and assign them a value innitially. use constants if used on included files and such. validate all user input, leave no open doors. For one example, I often times use arrays for known input content and say if(in_array(blah blah)){//do somthing}else{ exit(); }, I've got dozens … | |
I have a large multidimentional array that I am looping through to change it's structure and theoretically this function will work accept the "variable array" part. And maybe that's not the right name for it as I have checked my resources and cannot come up with the right syntax for … | |
Re: You can get the exact HTML from that external source by using the curl library. [URL="http://us2.php.net/manual/en/ref.curl.php"]http://us2.php.net/manual/en/ref.curl.php[/URL] or you can use ajax [URL="http://www.w3schools.com/Ajax/Default.Asp"]http://www.w3schools.com/Ajax/Default.Asp[/URL] | |
Re: I don't know if it will throw an error but you don't need $this-> if you are not in object context. Another thing, I don't know if you did already but you may want to check the permissions of that dir you are trying to upload to. What is the … | |
Re: You can pull all the data down at once and toggle the display option with <div>s. hidden = <div style="display:none;"></div> shown = <div style="display:block;"></div> or <div style="display:inline;"></div> here is a quick example of a js function that you can use. [CODE]<script language="javascript"> function toggledivs(id, state) { if(state == "hide") { … | |
Re: [CODE] $replace = array(',,,"', ',,,x'); $replacewith = ","; foreach($old_lines as $line) { $newstring = str_replace($replace, $replacewith, $line); //process the string } [/CODE] |
The End.