492 Posted Topics

Member Avatar for ayesha789

You will need another table for users, and in that table you will need a column for their permission level. Then in your PHP script, check the users permission from the DB, and only give them the options they are allowed to use.

Member Avatar for ayesha789
0
168
Member Avatar for ItecKid
Member Avatar for Encrypted

Try using like instead of = in the query. [code] $result = mysql_query("SELECT * FROM `some_table` WHERE `some_column` like '%some_value%'"); [/code] I was beaten by the post above :), that suggestion takes into account the commas too. My suggestion will match anything with that number in, so if $test was …

Member Avatar for Encrypted
0
129
Member Avatar for tearose49

[QUOTE=tearose49;1171685].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.[/QUOTE] Would you mind posting said code here for review? We …

Member Avatar for tearose49
0
103
Member Avatar for OS_dev

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 :)

Member Avatar for cwarn23
1
141
Member Avatar for clueless07

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?

Member Avatar for clueless07
0
134
Member Avatar for rainhider

Your syntax is incorrect. Try this: [code] if (mysql_num_rows($result) > 0) { $row = mysql_fetch_assoc($result); while ($row = mysql_fetch_assoc($result)) { print_r($row); } } [/code]

Member Avatar for rainhider
0
122
Member Avatar for ragnarok511

Make sure you have PHP installed from [url]www.php.net[/url] otherwise the server will treat the php file as any other unknown file and ask to download it.

Member Avatar for ragnarok511
0
136
Member Avatar for sallycheng
Member Avatar for josephe
Member Avatar for josephe
0
231
Member Avatar for drewpark88

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 …

Member Avatar for edwinhermann
0
207
Member Avatar for danielpataki

From the jQuery site: [code] $.post("test.php", { name: "John", time: "2pm" }, function(data){ process(data); }, "xml"); [/code] Try wrapping your if statement in a function, then calling this function and passing 'data' to it within the success function in the .post: [code] $.post(script_location, {data : some_value}, function (data) { my_function(data); …

Member Avatar for Will Gresham
0
84
Member Avatar for Will Gresham

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 …

Member Avatar for Will Gresham
0
135
Member Avatar for samarudge
Member Avatar for virspy

[QUOTE=virspy;1164332]I require a crawler in php[/QUOTE] 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 …

Member Avatar for cwarn23
0
68
Member Avatar for visualmonk

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: [CODE] Returns FALSE if var has a non-empty and non-zero value. The following things are considered to be empty: * "" (an empty string) …

Member Avatar for visualmonk
0
281
Member Avatar for WoW Me Web Girl

What is going on with these lines? [CODE] z-index:3; then >?php info ?>[/CODE] Doesn't really look right. You have not closed the [icode]<style type="text/css">[/icode] or [icode]<!--[/icode], you are missing a } to indicate that you have finished the styles for #footer and PHP is opened with [icode]<?php[/icode] not [icode]>?php[/icode] I …

Member Avatar for WoW Me Web Girl
0
375K
Member Avatar for steven2

This cannot be done in PHP, you will need to edit a htaccess file and use RewriteRules in there.

Member Avatar for steven2
0
82
Member Avatar for Ancient Dragon

[QUOTE=Ancient Dragon;1155178]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.[/QUOTE] It is pretty much a given that …

Member Avatar for diafol
0
242
Member Avatar for Randomnoize
Member Avatar for vmanes

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

Member Avatar for vmanes
0
78
Member Avatar for apegram

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 …

Member Avatar for geekgoddess
1
242
Member Avatar for niths

Perhaps read the sticky in the forum? [url]http://www.daniweb.com/forums/thread191031.html[/url] And try to use code tags.

Member Avatar for cwarn23
0
151
Member Avatar for WoW Me Web Girl

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 [URL="http://www.pixel2life.com/forums/index.php?showtopic=24205"]this[/URL] Also, use code tags.

Member Avatar for Will Gresham
0
2K
Member Avatar for cwarn23

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 - …

Member Avatar for Biker920
0
139
Member Avatar for Bubbleboy

The [icode]BrowserDetect.browser[/icode] and [icode]BrowserDetect.version[/icode] are what you are looking for, these will tell you the name and version number that the browser is reporting.

Member Avatar for alexhernandez
0
151
Member Avatar for Will Gresham

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) …

Member Avatar for chrishea
0
113
Member Avatar for clutchkiller

[QUOTE=apegram;1154726]For $45 you can avoid that ad for a whole year![/QUOTE] 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...

Member Avatar for cwarn23
1
130
Member Avatar for sarahgn4t

Use relative values such as % for width and height rather than fixed pixel values.

Member Avatar for almostbob
0
66
Member Avatar for bharat_bhusanam

There are many scripts available online which will do what you are looking for.. You would need to look into security and many other areas to get this working correctly, it would be easier to use a pre-made script.

Member Avatar for logonchristy
0
234
Member Avatar for rukshilag

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.

Member Avatar for rukshilag
0
96
Member Avatar for OS_dev

You are using classes, but you do not include the class files... you call [icode]$objDB[/icode] and [icode]$objStatement[/icode] 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.

Member Avatar for OS_dev
0
126
Member Avatar for gurinder16

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.

Member Avatar for diafol
0
217
Member Avatar for elijahmangwe

[QUOTE=ardav;1155839]You want to post that again with code tags?[/QUOTE] 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.

Member Avatar for Will Gresham
0
79
Member Avatar for Mushy-pea

Possibly the most useless idea since the pizza fork ([url]http://www.kitchencontraptions.com/archives/004593.php[/url])... What happened to wallboards displaying the latest trains and clocks hung around platforms...

Member Avatar for WaltP
0
117
Member Avatar for codeblock

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 …

Member Avatar for Will Gresham
0
160
Member Avatar for rutaba

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.

Member Avatar for Will Gresham
0
66
Member Avatar for happygeek

The first thing I posted was a response to someones question: [URL="http://www.daniweb.com/forums/thread122400.html#post599350"]This post![/URL] My first question was almost a month after joining [URL="http://www.daniweb.com/forums/thread127208.html"]here[/URL], but that never got a response :D

Member Avatar for Dave Sinkula
0
525
Member Avatar for Narue
Re: IRC

I have connected to the IRC a few times, but no-one is ever on when I do :)

Member Avatar for Nick Evan
0
281
Member Avatar for fuggles

Is the '$_SESSION['permissions']' value set? Change your query to this: [code] $result = mysql_query($query,$con)or die("Error: " . mysql_error()); [/code] Does it output any errors with that in place?

Member Avatar for liamfriel
0
87
Member Avatar for Zagga

Instead of putting a password hash in the URL (Not a very good idea) why not generate a random string when the user is created and just put this (and possibly the username) in the URL. Then, check that the string in the URL matches the one in the database …

Member Avatar for Zagga
1
170
Member Avatar for lrh9

Well, these messages are obviously not so secret anymore... But, IMO promotion of any single religion by any government is not right.

Member Avatar for jwenting
1
768
Member Avatar for ErlendHL

Your write function has a name which looks familiar. Try not to use names of actual JavaScript functions. What is happening is that you are saying: [code] onclick="write(document.getElementById('words').getAttribute('value'));" > [/code] Which is doing the same as if you have put: [code] onclick="document.write(document.getElementById('words').getAttribute('value'));" > [/code] See the problem?

Member Avatar for ErlendHL
0
116
Member Avatar for cloud09

Take a look at the onmouseup and onchange attributes for the input fields. Also look at regex (regular expressions) to check the field contents for only numbers.

Member Avatar for Will Gresham
0
150
Member Avatar for Salem

I use the same password for everything (nearly everything anyway) it contains part of the WPA2 key for my router, part of the phone number at my previous address and part of my name :P It is not a dictionary word, is 16 characters long has a mix of alphanumeric …

Member Avatar for PedroStephano
0
707
Member Avatar for resht

[URL="http://lmgtfy.com/?q=php+calendar+database"]Try searching?[/URL]

Member Avatar for Will Gresham
0
44
Member Avatar for phpDave

What code are you using at the moment and what errors (if any) does it return?

Member Avatar for phpDave
0
144
Member Avatar for veledrom

[url=http://lmgtfy.com/?q=ubuntu+open+source+php+editor]Google is your friend[/url], there are a multitude of editors available, people will have preferences. Just because someone likes an editor does not mean you will.

Member Avatar for Stefano Mtangoo
0
172
Member Avatar for whiteyoh

You should be using $result in the mysql_fetch_array() function, not $sql as this expects to receive the result of an SQL query.

Member Avatar for Will Gresham
0
67
Member Avatar for venus_me11

mysql_real_escape_string() will escape data for database entry. But you don't tell us what you are doing already, show code examples or really give us any idea of what you have done so far, but I assume this will work.

Member Avatar for Manuz
0
182

The End.