1,038 Posted Topics

Member Avatar for forwardlookguy

You have the statement correct but you don't need those extra parenthesis [code=php] if ($Series == "D" && $ModelYear == "2"){ echo "Skylark"; } else { echo "This is not a valid Series"; } [/code] That should work just fine, I'm not entirely sure what the problem is.

Member Avatar for Ole Raptor
0
176
Member Avatar for gil857

It's not a Firefox bug its that you're only coding for IE. Use this to get your request object [code=javascript] var XMLHttpFactories = [ function () {return new XMLHttpRequest()}, function () {return new ActiveXObject("Msxml2.XMLHTTP")}, function () {return new ActiveXObject("Msxml3.XMLHTTP")}, function () {return new ActiveXObject("Microsoft.XMLHTTP")} ]; function createXMLHTTPObject() { var xmlhttp …

Member Avatar for gil857
0
109
Member Avatar for mkerrigan

\s is the control character for whitespace (tabs, spaces, and newlines) so just add that to your regex which is also not working as you think it should given that you aren't escaping regex control characters. It should be something along the lines of [code=php]$something = preg_replace('/[^\w~!@#\$%&\*\(\)\-=\+'\|:;",\./\?\s]/','',$something_else);[/code]

Member Avatar for ShawnCplus
0
88
Member Avatar for joker40

[QUOTE=sDJh;619206]Of course you can. Basically everthing ist possible with PHP, even complicated stuff when you extend it with system-specific functions. Things that generally cannot be solved in PHP: - JAVA (Chat, Games) - Flash (Animations, Games) - JavaScript (Eventhandling and Website-manipulation)[/QUOTE] That's not entirely true, PHP has functionality to import …

Member Avatar for scorpionz
0
179
Member Avatar for Sheridan

Query strings are used when you need to send data through the URL. [code=html]<a href="somePage.php?first_name=Foo&last_name=Barr">Barr, Foo</a>[/code] When a user clicks on that link it will send them to the page [icode]somePage.php[/icode] with the following data. [code]first_name = Foo last_name = Barr[/code] The first variable is appended to the url with …

Member Avatar for silviuks
0
269
Member Avatar for scottholmes

I believe JQuery can take a class as a parameter something like $('.classname') rather than $('#id')

Member Avatar for ShawnCplus
0
75
Member Avatar for assgar

I'm pretty sure it has to be surrounded with quotes, ie., [code=sql]SELECT first,last, number from friend WHERE id IN ('1','2','3','4')[/code]

Member Avatar for assgar
0
121
Member Avatar for heels

You set the form's action to [icode]<?php echo $_SERVER['PHP_SELF'] ?>[/icode]. The page will post back to itself.

Member Avatar for heels
0
74
Member Avatar for swapna7999

It's called [url=http://www.google.com/search?q=php+pagination]pagination[/url]

Member Avatar for ShawnCplus
0
48
Member Avatar for ShawnCplus

Small script to pull information from [url=http://trac.edgewall.com/]Trac[/url]. Note that this will [b]only[/b] work if you set up your trac environment to use a MySQL database (It is pretty simple to switch from SQLite to MySQL though). It uses template format just to make it easy to customize. I originally had …

0
99
Member Avatar for Zavani Nixon

Given that Visual C++ 6 is 10 years old I would bet the farm that it's compatibility. I would highly suggest you upgrade to a version newer than a decade old.

Member Avatar for Ancient Dragon
0
236
Member Avatar for mikki2

That is called a favicon, it's pretty easy to implement just toss this in your [icode]<head></head>[/icode] section. [code=html]<link rel="shortcut icon" href="location of your image here" type="image/type here" />[/code] So if I had an image called myFavicon.jpg I would use. [code=html]<link rel="shortcut icon" href="myFavicon.jpg" type="image/jpeg" />[/code]

Member Avatar for mikki2
0
125
Member Avatar for ellabean

Any particular reason why you're disabling cookie functionality, that would solve your problem right there.

Member Avatar for digital-ether
0
104
Member Avatar for latour1972

You don't use [icode]endl;[/icode] after [icode]cin[/icode] you use it after [icode]cout[/icode]. [icode]cin[/icode] is used for input. Please use code tags as well

Member Avatar for henpecked1
0
137
Member Avatar for Bizzy_gezza
Re: Hi

Depending on what languages the scripts are in, PHP, Perl, etc. you have to make sure that your hosting provider supports and/or can enable support for the languages.

Member Avatar for ShawnCplus
0
58
Member Avatar for mom_of_3

The same holds true for PHP for both variables and functions. [code=php] class SomeClass{ private $test1; public $test2; private getTest1(){return $this->test1;} public getTest2(){return $this->test2;} }[/code] Then if you try to access them [code=php]$blah = new SomeClass(); $test1 = $blah->getTest1(); //error $test2 = $blah->getTest2(); //works[/code]

Member Avatar for ShawnCplus
0
94
Member Avatar for kevin wood

[code]<input type="hidden" value="<?=$rand ?>" name="rand" /> [/code] The [icode]method[/icode] only applies to the form tag.

Member Avatar for ShawnCplus
0
121
Member Avatar for fluffythebunny

You don't need a database to use Ajax. Ajax's purpose is to allow you to send asynchronous requests to a separate page and handle that request (hence the name). You can, if you want, make a request to a page which interacts with the database but Ajax itself shouldn't really …

Member Avatar for fluffythebunny
0
61
Member Avatar for charvie

[code=html] <input type='checkbox' name='someArray[]' value='1' /> <input type='checkbox' name='someArray[]' value='2' /> <input type='checkbox' name='someArray[]' value='3' />[/code] Then in PHP [code=php] $someArray = $_REQUEST['someArray']; foreach($someArray as $key=>$someElem){ $query = "DELETE FROM someTable WHERE id = ".$someElem; } [/code]

Member Avatar for effu
0
163
Member Avatar for web_master

The div should look like this if you want it to be hidden in the first place. [code=html]<div id="testDiv" style='visibility:hidden'>[/code]

Member Avatar for web_master
0
106
Member Avatar for still_learning

Have an empty div with an online attribute ie., [code=html]<div style='height:100px;width:100px;position:absolute;top:0px;left:50px;z-index:9' onclick='window.location="www.google.com";'> </div>[/code] With that, if someone clicks anywhere in that 100x100 box 50 pixels from the left edge they will go to Google.

Member Avatar for ~s.o.s~
0
99
Member Avatar for maydhyam

OK, there is another post that deals with almost the exact same topic. You can't use relative links in emails. The recipient's email client doesn't know what or where resetPassword.php is, nor does it know where 'images/emailNotGone.png' is. You have to use [b]absolute[/b] links, ie., [url]http://www.example.com/resetPassword.php[/url]

Member Avatar for maydhyam
0
155
Member Avatar for trient

You would test the form field with a regex like this. (10, 2) in database means 10 numbers, 2 decimal places. so 12345678.90 is valid. [code=javascript]var testRegEx = /[0-9]{1,8}\.?[0-9]{0,2}/ var isValidNumber = form.formField.value.match(testRegEx);[/code]

Member Avatar for ShawnCplus
0
315
Member Avatar for CasTex
Member Avatar for zainul.dss

Arrays are always dynamic in PHP as pritaeas pointed out. As in most of the dynamic data structures in C++, you can also use array_pop and array_push in PHP.

Member Avatar for ShawnCplus
0
328
Member Avatar for falassion

As per pretty much every other reply on the forum to posts like yours, and as per the rules: Please show some effort before asking for homework help.

Member Avatar for ShawnCplus
0
36
Member Avatar for sDJh

That is because 'hand' is deprecated in lieu of 'pointer'. 'hand' only works in Internet Explorer.

Member Avatar for ShawnCplus
0
141
Member Avatar for Inny
Member Avatar for Inny
0
95
Member Avatar for Ravenous Wolf

Firstly I would have to significantly disagree with the lack of good PHP books. The reason there are "good" books for Perl/Python is because the users of those languages are fanboys/fangirls and would hate to decry their precious language. PHP is so widely spread at this point it is absurd …

Member Avatar for Ravenous Wolf
0
148
Member Avatar for tejalrupera
Member Avatar for scru

Well it can't be done with a normal select box, you have to pretty much hack a bunch of divs and/or spans together to act like a select box. It's been done with a few AJAX autocomplete scripts that you can tear apart.

Member Avatar for scru
0
122
Member Avatar for aran87

In syntax "markup" anything in angle brackets, < >, is a required field, anything inside brackets [ ], is optional. So [icode]DELETE FROM <table>[/icode] means that you [b]must[/b] have something where it says <table>, ie., [icode]DELETE FROM someTable[/icode]. That said the query format is [code=SQL]DELETE FROM <table > [, table …

Member Avatar for ShawnCplus
0
85
Member Avatar for raweiss

Make sure you go over to [url]http://www.php.net/releases/[/url] and check the changelogs for compatibility and major upgrades that can break code. Checking changelogs is always good practice when making an upgrade to prevent things like this.

Member Avatar for raweiss
0
121
Member Avatar for kevin wood

The images aren't working because you are using relative paths. You have to use absolute paths(with the domain included) to be viewable outside of the host domain.

Member Avatar for kevin wood
0
121
Member Avatar for viswa_007

Well [url=http://www.daniweb.com/forums/post577446-2.html]this post here[/url] describes how to use modal divs, switching visibility of elements is all over the site so use the search box up in the right corner there.

Member Avatar for MidiMagic
0
72
Member Avatar for ShawnCplus

Is it just me or have serif fonts become the new go-to font of Web 2.0 sites. Out the window with you old, boring sans-serif Verdana. Who needs you Arial? We have Georgia, glorious Georgia, or even *gasp* Garamond. Has the serif laid it's pointy edge into the blunt broadside …

Member Avatar for Al-Saeed
0
125
Member Avatar for cork

[code=php]if (isset($_COOKIE['$Username'])) $visits = $_COOKIE['$Username'];[/code] Never works because variables in single quotes ', aren't parsed. You need double quotes, ie., [code=php]if (isset($_COOKIE["$Username"])) $visits = $_COOKIE["$Username"];[/code] You have to do that for all of those variables in there.

Member Avatar for cork
0
1K
Member Avatar for mortalex

selectbox.options is an array. The add() function is a member of the Element family ie., [icode]selectbox.add(<elem>);[/icode] not [icode]selectbox.options.add(<elem>);[/icode]

Member Avatar for mortalex
0
140
Member Avatar for xthematrix

Any particular reason why you are escaping these variables in this section? [code=php] \$row1=mysql_fetch_array(\$content1); \$display_content1 = \$row1['content1']; print \$display_content1; print "<BR><BR>"; \$row2=mysql_fetch_array(\$content2); \$display_content2 = \$row2['content2']; print \$display_content2; print "<BR><BR>"; \$row3=mysql_fetch_array(\$content3); \$display_content3 = \$row3['content3']; print \$display_content3; print "<BR><BR>"; [/code] Aside from that, the unexpected $end error comes from a missing or …

Member Avatar for ShawnCplus
0
167
Member Avatar for santoo

Use the onclick attribute with a function along the lines of [code=Pseudocode] Function EnableRadioButtons ( array Elements ) For each Element in Elements Set Element Enabled [/code]

Member Avatar for AaronASterling
0
148
Member Avatar for 2bu

Well it really depends on how you want to build, I don't really have a lot of experience in CF and don't really care to but one of the main things that drew me to PHP was just how [b]much[/b] information there is out there for it, mainly due to …

Member Avatar for buddylee17
0
129
Member Avatar for schumaj

Well making the background dark is pretty easy with CSS (Modal CSS), however, the fading part requires some javascript. However, it is possible. to get CSS/DHTML to be completely cross-browser compliant even if it does require a bit of work. [url=www.quirksmode.org]QuirksMode[/url] has an excellent list of browser compatibility for CSS …

Member Avatar for MidiMagic
0
94
Member Avatar for dottomm

If it's not containing the necessary variables then your "getvar" function isn't working correctly, which you don't have posted here.

Member Avatar for dottomm
0
1K
Member Avatar for Gia

This is a little function I wrote to verify form fields, all you need is an div with the id "error" to take the output. [code=javascript] /** * Make sure required fields are set on a form * * @param elements Array of required field IDs * @param parentForm ID …

Member Avatar for ShawnCplus
0
147
Member Avatar for sree22_happy

Well the only thing you need for a modal window is two divs, and outer div to make the page modal and an inner div to hold the modal content. For example [code=html] <html> <head> <title>Blah</title> <style type='text/css'> .modal { z-index:998; height:100%;width:100%; position:absolute; left:0px;top:0px; } .modalContent{ z-index:999; } </style> </head> …

Member Avatar for sree22_happy
0
428
Member Avatar for SandraC

You're never passing an argument to the findValue function. findValue requires an argument but it is never receiving one.

Member Avatar for SandraC
0
146
Member Avatar for hacker9801

Why would you create multiple instances of the same image with DOM manipulation instead of just setting the background image on the div with css which will automatically tile the image?

Member Avatar for hacker9801
0
117
Member Avatar for carobee

While there is no browser integration that determines whether a specified window is open or not you could set a session bit once someone has visited the page then display the 'error' message if they visit it again with the bit set.

Member Avatar for carobee
0
133
Member Avatar for pranto157

Well if you're basing the creation on AJAX calls then you'd probably want to use a bit of DHTML instead of manipulating the innerHTML property, ie., [code=javascript] function addRadio(parentID, radioID,radioName,innertext,color) { parent = document.getElementById(parentID); newRadio = document.createElement('input'); newRadio.type = 'radio'; newRadio.id = radioID; newRadio.name = radioName; parent.appendChild(newRadio); newtext = document.createElement('span'); …

Member Avatar for ShawnCplus
0
70
Member Avatar for sukhy_1

As per the rules, Suomedia, it's good to keep things on the site. Solving problems through PMs, email and sending attachments makes things cumbersome and difficult to search through if someone else is sharing the problem.

Member Avatar for nav33n
0
185

The End.