In XHTML 1.0, you cannot use a table tag within a p tag.
When using p, any other block-level element will effectively close the p.
Does it work if you remove the paragraph tag?
In XHTML 1.0, you cannot use a table tag within a p tag.
When using p, any other block-level element will effectively close the p.
Does it work if you remove the paragraph tag?
.I think it's not connecting to the database, as we added a couple echo statements that should tell me if if got to the db, then to the table. It doesn't print them, so I guess that's the first problem.
Would you mind posting said code here for review?
We are happy to help, but we are not here to spoon feed you code.
You will learn more from having mistakes corrected than just being told the answer.
Your syntax is incorrect.
Try this:
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_assoc($result);
while ($row = mysql_fetch_assoc($result)) {
print_r($row);
}
}
No extraction required, just count $_POST['label']
:)
Make sure you have PHP installed from www.php.net otherwise the server will treat the php file as any other unknown file and ask to download it.
From the jQuery site:
$.post("test.php", { name: "John", time: "2pm" },
function(data){
process(data);
}, "xml");
Try wrapping your if statement in a function, then calling this function and passing 'data' to it within the success function in the .post:
$.post(script_location, {data : some_value}, function (data) {
my_function(data);
});
function my_function(response) {
if (response == "valid") {
} else {
}
}
What (if any) errors is the script returning?
Figured there would be something like that :)
But what's the saying? If you don't ask, you won't get :P
Not really a problem, just asked because purple doesn't really go with the colour scheme on my site, but I can make it work :D
Ah, whoops, wrong brackets as well. Missed that on your first post :P
For functions, use standard braces ( and ).
Curly braces are for statements and function definitions.
So it should be substr($_REQUEST['cc_number'] , -1, 4)
Almost right., the -4 needs to be -1 though.
A positive number will start from beginning of the string and return the number of characters specified, while a negative number to start from end of string.
In this case, you want to start with the last character(-1) and read 4 characters :)
Disable the ads?
No ads here and the site loads in a decent time, not quite instant but it doesn't have a noticeable delay either :)
I was thinking about the DaniWeb badge earlier, and the possibility of putting it onto my site, but it really doesn't fit in with my sites colour scheme :(
I would like to suggest customisation options for the current purple background.
You are already generating the image from post counts and other user data (GD or ImageMagick I assume) so would there be any chance of allowing an (optional) variable in the URI for a hex colour to use as the background to replace the purple?
Instead of http://www.daniweb.com/certificates/badge323950.jpg
perhaps allow something like http://www.daniweb.com/certificates/badge323950.jpg?c=000000
?
Just throwing it out there.. No idea how many people actually have the badges anywhere or if anyone else would be interested in doing so if it was customisable... I can't imaging server load would be hugely different if this was an option..
1. Software developers are keyboard-friendly. When we've entered our log-in and password, we don't want to reach for the mouse to click on 'Go,' we want to tab to it. The tab key doesn't take you to it, however. It most definitely should.
Hm, I will disagree with you there.
From experience, I would expect pressing Enter/Return to submit the login, personally I can't think of a single time I have 'tabbed' to a button to submit a form.
While I agree that the tab order should be logical, I find pressing one key much simpler than pressing tab and then pressing enter (which works on its own)...
What is the problem in the 2nd link?
I require a crawler in php
How nice, what do you want us to do? Make it for you?
I very much doubt that will happen.
Show us the script you have now and we can suggest improvements or changes.
Other than people who want an ego boost, you won't be spoon fed anything.
This cannot be done in PHP, you will need to edit a htaccess file and use RewriteRules in there.
It might be helpful to post the actual code you used when you got the error.
May help to post some more of your code.
But I assume you are running an empty() check on the POST vars?
From the PHP manual:
Returns FALSE if var has a non-empty and non-zero value.
The following things are considered to be empty:
* "" (an empty string)
* 0 (0 as an integer)
* "0" (0 as a string)
* NULL
* FALSE
* array() (an empty array)
* var $var; (a variable declared, but without a value in a class)
I would say in this case possibly use the isset() instead, this will return false on a NULL value, rather than a 0.
Otherwise, post the code so we can look.
What is going on with these lines?
z-index:3;
then
>?php
info
?>
Doesn't really look right.
You have not closed the <style type="text/css">
or <!--
, you are missing a } to indicate that you have finished the styles for #footer and PHP is opened with <?php
not >?php
I also have no idea why you have a random then and info in there either...
That's what we are here for :P :D
Don't forget to mark as solved.
Please tell me that was intended as a joke....
I can see some poor student coming across it and taking it to hand in as part of an essay :P Would serve them right, mind :D
Yes, the Queen can dissolve the government and also can refuse legislation from being passed, however this is unlikely to happen.
In reality the Queen /can/ do these things but due to the controversy that would occur if she were to do so, I doubt it will happen any time soon.
Take a look at this for more information:
http://en.wikipedia.org/wiki/Constitutional_monarchy
Perhaps read the sticky in the forum?
http://www.daniweb.com/forums/thread191031.html
And try to use code tags.
That line would look for a function called write_log, and send it the values
$query
$this->debug_filename
0
and 'txt'
write_log is not a PHP function, so you will need to have a custom one defined somewhere with this name.
So, somewhere in your script you will need to have the function telling it what to do, e.g.:
function write_log($used_query, $filename, $status, $type) {
// Do something with the values here
}
That is just an example, I don't know what the values you are sending are for so the vars I used may not be appropriate.
You do not have a function called 'write_log' within the class in the above script.
If the function 'write_log' is defined outside the class, you cannot reference it as you are trying as it is not registered in the class.
Take a look at this
Also, use code tags.
Hi All.
I think this is the right place for this post.
Finally got around to connecting the HDMI cable between my PC and Monitor today, about time I got rid of the VGA.
When reading the below, bear in mind that on VGA, there were 0 problems at 1440*900)
First thing I noticed, the edges of the display were missing (can't see left half, about 50%, of the Start button and the same amount on the other side).
No problem, I thought, wrong resolution. So I go check. The documents for the monitor state that the Native res is 1440*900, and this is what it is set to :(
I change it about a bit and finally find one that works, Finally, I can see the whole screen again. All is good with the world, until I go to read a page in Firefox... The font is barely legible, blurry. I go play with ClearType for about 30 minutes and get something legible but not good by any means. I switch the res back to 1440*900, play with ClearType again and the text is perfect. But, again, I have lost the right and left edges of the display D:
As a last resort I tried the nVidia control panel, and saw that in there was an option for 'Adjust desktop size and position' Perfect! until the options page comes up.. There is a message there saying that my display format does not …
Other than a mouse and keyboard, what's the difference anymore?
I've been looking for that game for awhile. Had a chance to pick it up along time ago cheap, but had no cash and now they're hard to find or more cash than I carry. Sort of how I want to see how the Golden Sun story continues, but the second part is hard to find or as much as $114 for a mint copy(not like there's any point to a mint edition).
Holy **** :-O
I still see boxed PAL copies of all 3 disks go for £20-£30 here.. Not sure why NTSC ones are more expensive... Very good game though :)
Pokemon Gold. Sadly, the internal game-cartridge battery died and I'm to lazy to replace it.
Unless we're talking strictly desktop x86 games here. Which it also runs on if you have the ROM and an emulator.
I assumed we were talking Desktop Computer Games.
If not, then there is only one answer, and that answer is Final Fantasy VII :)
Use relative values such as % for width and height rather than fixed pixel values.
The BrowserDetect.browser
and BrowserDetect.version
are what you are looking for, these will tell you the name and version number that the browser is reporting.
I am also fairly happy with my PC:
Dual boot - Novell openSuSe 11.2 x64 / Windows 7 Ultimate x64.
Processor - AMD Phenom X4 9650
RAM - 8 GB DDR2-1066.
Hard Drive - 2 x 750 GB SATAII (RAID0).
Optical Storage - Blu-Ray reader & DVD Combi.
Graphics - PCI Express x16 - NVIDIA GeForce GT 120 - 1024 MB.
Works fine for what I need, both Windows and Linux boot completely in under 1 minute :)
Would it really bring DW to its knees if every one of them started a yipee thread?
Well, there is one way to find out... :P But I doubt that anyone would be popular for spamming the Geeks' Lounge with a whole load of 'x000 posts made' threads :D
darkagn is correct, looks like you are missing multiple commas in the values of the query.
Also, may I suggest that you sanitize the input from the form.. Entering unchecked POST data into your database is asking for trouble.
A Full English Breakfast cannot be beaten :D
You want to post that again with code tags?
Might also help if he tells us what the problem is... 'Cant connect and retrieve from database' is not very specific.
Post the error message you are getting, and what you have tried to resolve it.
You are using classes, but you do not include the class files... you call $objDB
and $objStatement
but at no point in the code above do I see these being declared.
If someone came across this script and tried to use it, they will not have much success.
You probably have either deleted or altered your .htaccess file.
You can disable directory/file listing and specify the DirectoryIndex globally in the /conf/httpd.conf file to prevent this.
There is no "best", nor can there be.
Not only don't you supply any criteria to use in defining "best" that can be scientifically measured, you don't know all games out there so can't even apply those criteria to every game in existence in order to see how well it matches them.
–adjective,superl. of good with better as compar.
1. of the highest quality, excellence, or standing: the best work; the best students.
2. most advantageous, suitable, or desirable: the best way.
3. largest; most: the best part of a day.
:P
'Best' would be a matter of opinion anyway, what you think is the 'best' game could bore someone else.
Personally, my favourite game is either; World of Warcraft or Age of Empires 3. :)
Yeah that's the the way it goes. But back to that silly ad, come on a splash screen that obstructs menu controls? A little carried away with their selves aren't they. Later---
Yes, if a company does that with their ads I generally avoid them (Th ads, as well as the company)
I don't want my browsing interrupted by those annoying flash pop-ups :P
Gee. You just aren't into progress, are you? :icon_twisted:
Not for the sake of it :P
But then being in the UK, the trains where I am are late so often, that if you miss it it's your own fault :D
What urtivedi said, although I prefer print_r() as this is much easier to look at and read (IMO)
Also, you check the ID is numeric which is a start, but you also need to sanitize all of the POST data before entering it into the database, if someone entered an SQL injection attempt into one of the fields, they could cause serious problems :)
You can check the User Agent using the $_SERVER super global. If the User Agent is that of a mobile device, display alternate content.
Quite easy to do in PHP.
I certainly hope it is NOT Charles's wife -- she is such an ugly (female dog). There was a picture of William's girl in the tabloid and she is a very good looking woman, one that might be worthy to be Queen.
It is pretty much a given that the Queen will hold onto the throne for as long as possible to keep Prince Charles off it :D
I don't think many people in the UK think the idea of Charles as King is a good one :P
Yeah but for some of these guys in here, $45 is probably only a little over an hour of work. Hardly breaking the bank.
My hourly wage is about £9.50 (About $14) and after I have paid bills/rent/other commitments, I have about £80 a week to live on.
I definitely do not fall into the group you describe :P
Possibly the most useless idea since the pizza fork (http://www.kitchencontraptions.com/archives/004593.php)...
What happened to wallboards displaying the latest trains and clocks hung around platforms...
For $45 you can avoid that ad for a whole year!
Or $25 for 6 months :P
I would say that paying is better than ABP or NoScript. Makes you feel good :D Unlike ABP which makes me feel like I am stealing...
You should do as other people have suggested and take pride in your work.
Personally, if what I produce matches what the client has asked for then it was a good job and I am happy.
Never mind that the client is always changing what they want and that they always want it yesterday, when it comes down to it, as long as I get paid and the job gets completed. I am satisfied.
Although, at present I have only done a few small freelance projects...
Congrats :)
Been here 2 years and just approaching 600 :P