Search Results

Showing results 1 to 40 of 66
Search took 0.01 seconds.
Search: Posts Made By: MVied ; Forum: PHP and child forums
Forum: PHP Jan 16th, 2009
Replies: 3
Views: 464
Posted By MVied
Well if that were the case, you could write a .htaccess file that only allows requests from localhost to access the files in the directory.
Forum: PHP Jan 15th, 2009
Replies: 3
Views: 464
Posted By MVied
You should be fine as long as you only allow certain file types to be uploaded. For instance, you don't want people to be able to upload files that may contain malicious code to your website. You...
Forum: PHP Jan 15th, 2009
Replies: 3
Views: 271
Posted By MVied
For future reference, try using this tool. It's really handy. http://www.roblocher.com/technotes/regexp.aspx
Forum: PHP Jan 15th, 2009
Replies: 3
Views: 271
Posted By MVied
Try this: [A-Z]{1,3}
Forum: PHP Jan 15th, 2009
Replies: 5
Views: 1,886
Posted By MVied
As far as I know, there is no Master's in Web. Even a Bachelor's is hard to come by. If you want to, you could go for your CIW certification (http://www.ciwcertified.com/certifications/program.asp)...
Forum: PHP Jan 15th, 2009
Replies: 7
Views: 1,336
Posted By MVied
Additionally, your code is very unsafe. Anyone could hack this form with MySQL injections, such as typing ' OR a=a-- in the password field. This would allow them to login to the site with the...
Forum: PHP Oct 4th, 2008
Replies: 5
Solved: Math Problem
Views: 464
Posted By MVied
Basically the problem was $i starting off as 0. This threw it off completely. I used $n to start as 1 and count (because I use the $i for more than just an increment).

I'll be posting this project...
Forum: PHP Oct 4th, 2008
Replies: 5
Solved: Math Problem
Views: 464
Posted By MVied
Well, your solution didn't work for me, but it got me thinking and now my code works. :D

Soon I'm going to post it in the Web Developer's Lounge. It'll be something everyone wants. ;)
Forum: PHP Oct 4th, 2008
Replies: 5
Solved: Math Problem
Views: 464
Posted By MVied
Okay, so I'm writing an application. In this application there is a drop down with the selections 10, 20, 30, and so on to 100. This drop down controls the amount of times a loop will occur....
Forum: PHP Sep 19th, 2008
Replies: 6
Views: 718
Posted By MVied
Should be something like this:"<a href=\"re_images/".$img."\" target=\"_blank\"><img src=\"re_images/".$img."\" alt=\"ALT TEXT\"width=\"100\" height=\"100\" border=\"1\" /></a><br />\n";
Forum: PHP Sep 18th, 2008
Replies: 6
Views: 718
Posted By MVied
And if you're interested in making that code a little smaller:
<?php
if(!empty($a1[image])) {
$im_array = explode("|", $a1[image]);
$images = "";

if ($im_array !== false) {
foreach...
Forum: PHP Sep 18th, 2008
Replies: 8
Views: 2,127
Posted By MVied
This:<?php while($row = mysql_fetch_array($sqlresult)){ ?>Should be this:<?php while($rows = mysql_fetch_assoc($sqlresult)){ ?>Your variable was named $row and you called it later in the loop as...
Forum: PHP Sep 18th, 2008
Replies: 8
Views: 984
Posted By MVied
If you're using JavaScript to call a PHP file, then it sounds like AJAX. In which case you would have to use the DOM to display the result of the PHP script. Please show us the script you're using.
Forum: PHP Sep 16th, 2008
Replies: 2
Views: 975
Posted By MVied
The phone number is a good idea as a spam bot probably won't fill that in correct, especially if we validate it. :)

This method will accept a 10 digit phone number with spaces, dashes, or neither....
Forum: PHP Sep 16th, 2008
Replies: 3
Views: 561
Posted By MVied
Better yet go get phpMyAdmin and use the GUI to do it. That's about as simple as it gets.
Forum: PHP Sep 16th, 2008
Replies: 1
Views: 496
Posted By MVied
I may be wrong, but I believe there's PhpBB3 addons that will place ads on your site. I'm not sure, I hate putting ads on my forums.
Forum: PHP Sep 16th, 2008
Replies: 2
Views: 489
Posted By MVied
Well, if you're using a web host you can simply FTP to the server and drag and drop the image to where you need it.

What kind of host are you using?
Forum: PHP Sep 16th, 2008
Replies: 6
Views: 561
Posted By MVied
I made a ton of edits to my post. I kept noticing errors, lol. I've been doing this too long. :X
Forum: PHP Sep 16th, 2008
Replies: 6
Views: 561
Posted By MVied
And you probably want to declare the E-mail variables correctly. Also, paragraph tags within a form used in that way aren't exactly semantically correct. It's acceptable to use <br /> tags right...
Forum: PHP Sep 15th, 2008
Replies: 3
Views: 2,782
Posted By MVied
Well, it sounds like he doesn't need to do it personally, but needs to have a script that can do it for users of the script he's writing.

I've thought about doing something like this, but I never...
Forum: PHP Sep 15th, 2008
Replies: 3
Views: 962
Posted By MVied
This was actually the script I was going to suggest. You could implement it with your current system and possibly identify the IP addresses by the IP addresses your users logged in with. Just a...
Forum: PHP Sep 15th, 2008
Replies: 8
Views: 880
Posted By MVied
Actually, I tried my code and it didn't work. :P

Here's one that works like I described.

<?php
$filename = 'hitcount.txt';

if (!$_COOKIE['counter']) {
setcookie("counter", 1,...
Forum: PHP Sep 12th, 2008
Replies: 2
Views: 457
Posted By MVied
Yeah, I was just going to say Google. =P
Forum: PHP Sep 12th, 2008
Replies: 8
Views: 880
Posted By MVied
I've taken code from Shanthi's post and edited to to set a cookie when a user visits the page. When the user refreshes the page, it checks for the cookie. If the cookie exists, it does not add to the...
Forum: PHP Sep 12th, 2008
Replies: 3
Views: 2,806
Posted By MVied
Alright, no problem. The first thing we'll do is make sure that your drop down menu retains its value. In order to do this, we check the POST value of the select field and then add...
Forum: PHP Sep 12th, 2008
Replies: 3
Views: 1,045
Posted By MVied
Setting cookies is relatively easy.
setcookie("pr", array(), time()+3600);

That should work. Then when someone adds an item to their cart, you can append the next item to the array in the cookie....
Forum: PHP Sep 12th, 2008
Replies: 7
Views: 656
Posted By MVied
I looked it up, but I still don't see its use, lol.
Forum: PHP Sep 12th, 2008
Replies: 5
Views: 574
Posted By MVied
Yes, the SQL query you're running will not return any rows as you are not selecting anything from the database, so the function has no rows to count. :P

Try using this.


<?
include...
Forum: PHP Sep 12th, 2008
Replies: 7
Views: 656
Posted By MVied
Honestly, it's hard for me to say what's wrong with it because I've never actually come in contact with the extract function. For one thing you didn't declare $x as 0 before your loop, so that would...
Forum: PHP Sep 12th, 2008
Replies: 2
Views: 744
Posted By MVied
I'm having a hard time understanding what you're trying to accomplish; however, it is possible to have .htaccess files within folders that control what happens in that folder and it's subdirectories.
Forum: PHP Sep 12th, 2008
Replies: 1
Views: 523
Posted By MVied
I've solved my own problem and it had nothing to do with coding, firewalls, or the router. =P

I'm silly.
Forum: PHP Sep 11th, 2008
Replies: 1
Views: 523
Posted By MVied
In this management software I'm working on, I've built a messenger for the employees to use to IM each other. Recently we moved to a brand new server and upgraded from PHP4 to PHP5. Now the instant...
Forum: PHP Sep 11th, 2008
Replies: 7
Views: 656
Posted By MVied
Then the problem is with whatever you were trying to do before the piece that I fixed. Try this.

$sql = "SELECT DISTINCT(t_tag) FROM tags ORDER BY t_tag desc LIMIT 50";
$results =...
Forum: PHP Sep 11th, 2008
Replies: 4
Views: 810
Posted By MVied
Better yet, let's see the code that you're talking about.
Forum: PHP Sep 11th, 2008
Replies: 9
Views: 593
Posted By MVied
It depends on what kind of code you're talking about. If you simply want to change the theme or alter the HTML, there's a template system in PhpBB, but how you get to it depends on what version...
Forum: PHP Sep 11th, 2008
Replies: 3
Views: 1,045
Posted By MVied
Better yet, why not use cookies? I built my own store once and I used cookies to store user's orders. When they went to finalize their order, it was the inserted into the database. Also, I checked to...
Forum: PHP Sep 11th, 2008
Replies: 7
Views: 656
Posted By MVied
I know there's probably a better way, but this is the first thing that comes to mind.
for ($i=1; $i<=$x; $i++) {
$sql = mysql_query("SELECT t_tag FROM tags WHERE t_tag = '".$tag[$i]."';");...
Forum: PHP Sep 11th, 2008
Replies: 5
Views: 574
Posted By MVied
Excellent, I'm glad to help. Also, the mysql_num_rows error usually comes when the SQL query that it's counting from is an invalid query. If you have access to PhpMyAdmin and you see errors that you...
Forum: PHP Sep 11th, 2008
Replies: 5
Views: 574
Posted By MVied
Yes, your quotations are all kinds of messed up. I'll walk you through what's wrong so you don't make the same mistake again.

$sql = 'UPDATE user
SET active = 1
WHERE (password =...
Forum: PHP Sep 11th, 2008
Replies: 8
Views: 880
Posted By MVied
Or if you purely want something that counts visitors, you could use something simple like this.

<?php
$counter_file = ("counter.txt");
$visits = file($counter_file);
$visits[0]++;
$fp =...
Showing results 1 to 40 of 66

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC