Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~6K People Reached
PC Specs
It's great

29 Posted Topics

Member Avatar for tryphy

When using passwords, make sure you encrypt it. Saving raw passwords is not only bad practice, it's wrong. An extra security measure would be to encrypt the password before sending it VIA POST. This is easily done by using javascript, you never want to submit the raw password. Just some …

Member Avatar for liza_1
0
2K
Member Avatar for SoN9ne

I have no issues with setting up the mod_rewrite and having it create the clean URLs. My question is for more experienced htaccess users and I am wondering if there is a simple solution to my dilemma. My URLs without the cleanup look like: index.php?ctrl=portal&mode=main or index.php?ctrl=portal&mode=edit&id=2 I want my …

Member Avatar for djcodesa
0
238
Member Avatar for demodav

That's debatable. I use foreach on $_POST/$_GET but i use a white list to prevent injection. clever works as long as you cover all angles. Saying, "Clever may be fun but it's usually not the correct solution." is just plain wrong. Usually clever works, sometimes it can backfire. The foreach …

Member Avatar for scaiferw
0
277
Member Avatar for dks1383

There is no copyright infringement on iframes. As long as you are not stating that the content is yours there is nothing they can legally do.

Member Avatar for saiprem
0
118
Member Avatar for kira4

No SQL injection prevention; not a smart idea. Someone could delete your entire database. PHP should be using single quotes instead of double quotes, but that's just me being picky. HTML is a little sloppy and it seems that CSS would be able to fix your spacing issues. You major …

Member Avatar for SoN9ne
0
156
Member Avatar for alexjbriggs

Are you sure that $result has a value at this point? Do you have any checks to ensure that $result is defined and has a value? I normally only get this error when the variable being passes is NULL

Member Avatar for network18
0
95
Member Avatar for nadnakinam

PravinBhat is correct, try removing the parenthesis. Other issues you may want to address when you get this working: When using a variable in a function you don't need to include the "". See below for changes [code=php]$con=mysql_connect($host, $username, $password); mysql_select_db($db_name, $con);[/code] Use single quotes over double unless you need …

Member Avatar for nadnakinam
0
138
Member Avatar for jjtao

Replace this: [code=php] $sql_res=mysql_query("$sql_query"); $row=mysql_fetch_row($sql_res); [/code] With this: [code=php] $sql_res=mysql_query($sql_query); if (!$sql_res) { echo 'Could not run query: ' . mysql_error(); exit; } $row=mysql_fetch_row($sql_res); [/code] The die method(above post) could be used instead of the if statement, its a matter of personal preference, tho the die may be milliseconds faster …

Member Avatar for poojamakhija
0
171
Member Avatar for ilokana
Member Avatar for cmaclennan

I have a few suggestions if you don't mind. I have just written a script a lot like this (if you want to see an example pm me, since my employers site). To make it easier to insert, i set the field names as a array with the id as …

Member Avatar for aashishn86
0
144
Member Avatar for K?!

for a debugger i would suggest using the zend debugger. In my opinion, it is one of the best debuggers out there. Setting up the debugger is easy. I am not sure how to integrate it into the IDE you are using tho. I use zend IDE so it works …

Member Avatar for K?!
0
156
Member Avatar for NoID

By reading the first post. The code below should work and meet the criteria asked in the first post. There are some checks in play that will not allow an empty email to send, also if an empty ID is passed the script will just step over it. Also the …

Member Avatar for NoID
0
121
Member Avatar for socalfoolina

Another way to achieve the same effect without using CSS is to do item.style.display = 'none'; // Hides or item.style.display = ''; // Shows you can get the collapse effect with jquery or any other library for that matter. That would be the easiest. To get the effect so it …

Member Avatar for essential
0
134
Member Avatar for Mel64

I already wrote something like this. [code=js] function moveText(text, dispField, defaultText) { if (text.length < 2) { text = defaultText; } document.getElementById(dispField).innerHTML = text; } [/code] usage: [code=html] <input type="text" name="fname" id="fname" onkeyup="moveText(this.value, 'result', 'First Name')" onblur="moveText(this.value, 'result', 'First Name')" /> [/code] the 'result' is the ide of the div …

Member Avatar for Mel64
0
117
Member Avatar for sonia sardana

Yes, it is possible. If i was to do this I would use AJAX. It can do exactly what you want.

Member Avatar for carobee
0
134
Member Avatar for severman

Every time you call the function you are resetting i. put i outside of the function to keep the value and have in increment. try this: [code=js] var i = 3900; function hit( f ) { f.vaule = i; } [/code]

Member Avatar for hengzhe
0
320
Member Avatar for loligator

There are a few different ways you can approach this. You can still use your original concept, when validating the data for display, if the close value is less than the open, then obviously it is the next day. That seems to be the easiest, as long as the data …

Member Avatar for loligator
0
189
Member Avatar for rahul8590

Using phpmailer is an opinion not a solution. The first step is to identify the issue. Take the $headers out of the mail function and test the script again. Does it work? If so, your headers need to be correct. These headers will work for plain text, no attachement. Don't …

Member Avatar for pritaeas
0
95
Member Avatar for mbirame

It is called a carriage return. You can check out google for the full description. In a nutshell, it is the return/enter key. For the script it seems useless. a <br /> would be more beneficial. I use the \n when I build HTML in my PHP code and I …

Member Avatar for pritaeas
0
93
Member Avatar for angelo1969

Looking at your script. There are a few minor edits to prevent some php warning and errors. First, $header starts off as [code=php]$header .= "From: $naam <$mailadres>\r\n";[/code] try changing it to [code=php]$header = "From: $naam <$mailadres>\r\n";[/code] I am not seeing how the script fetches the variabels for the email. I …

Member Avatar for SoN9ne
0
114
Member Avatar for K?!

Because the example at w3schools is transitional, not strict. All form elements should be used in container tags. w3schools show examples, these are meant to help get you started but they are not the best when used straight from their site, at least not with strict. If you used transitional …

Member Avatar for K?!
0
128
Member Avatar for phpbeginners
Member Avatar for Airshow
0
78
Member Avatar for vtek

Since you are new to PHP you should get into good practices now. NEVER use " unless you are using a variable. Use ' instead. On small files this isn't so important but on heavy servers or heavy scripts that can save you a lot of page load time. As …

Member Avatar for langsor
0
135
Member Avatar for kifayth

For? email? forum post? private messages? Form submissions? Needs some more info to help.

Member Avatar for SoN9ne
0
51
Member Avatar for realnsleo

Have you tries using htmlspecialchars(); when displaying? Not sure if it's the best way but it works. Or you can use the HTML purifier which can fix these issues but thats a little heavy.

Member Avatar for SoN9ne
0
68
Member Avatar for somedude3488

To be honest I skimmed your php files. If you don't mind could you use the PHP code tag. Makes reading them much easier. In my opinion I think you are over complicating this. I have done the same concept off of 1 database class i wrote. Mind you, yours …

Member Avatar for somedude3488
0
159
Member Avatar for phpbeginners

If you don't mind, is the purpose of this for debugging? If so this is not something you should even get into. It's wrong, dirty, and unprofessional. If not then just ignore this post tho reading below won't hurt ;) You should use a debugger. I prefer the zend debugger. …

Member Avatar for SoN9ne
0
287
Member Avatar for pabzzmike

This is simple. After the db has been successfully updated run a simple mail command. In you code, where you submit the data to the database, add this below the success check. [code=php] $msg = 'blah blah blah'; mail('your@email.com', 'New user registration', $msg); [/code] This should send a plain text …

Member Avatar for SoN9ne
0
78
Member Avatar for whiteyoh

Try this instead. This should save you some headaches later down the road as well as save your error log. textareas are suppose to have cols and rows set to properly validate. isset will make sure not to load the var if it isn't set, thus saving your error log …

Member Avatar for whiteyoh
0
297

The End.