SharkBait
Members-
Posts
845 -
Joined
-
Last visited
Never
Everything posted by SharkBait
-
Mod_rewrite along with Archive for a blog
SharkBait replied to SharkBait's topic in Apache HTTP Server
Alirght did that and it works. Thanks! -
Mod_rewrite along with Archive for a blog
SharkBait replied to SharkBait's topic in Apache HTTP Server
So what you're saying is that I should take the URL and explode() it on the slashes to see where it is? I would still need mod_rewrite though wouldn't I because I currently don't want to actually put my files 2 directories deep in the site. -
Hi, I need some suggestions on how I should go about my next little ask. My blog script needs some form of Archives (like you see in WordPress etc). Now I am not sure how they are done but when you see the URL like this: www.mysite.com/2006/12/ - You would assume its year 2006 with month 12 correct? Now would something like this be helpful? [code] RewriteRule ^([0-9+)/([0-9+)$ archives.php?y=$1&m=$2 [/code] Then I assume I would pull y and m from the URL with $_GET[] correct and then just continue on with that? Does this make sense in the way that perhaps Wordpress would do it? I am going about this the correct way right? Thanks!
-
Do they have a spam filter in place? Perhaps it is being caught? Do you have shell access to your webserver? You can check to see if the mail was successful via the logs.
-
[code] <input type="text" name="name=" value="<?php if(isset($_GET['name'])) echo $_GET['name'];?>" /> [/code] Would put the name from the URL into the form field for the name
-
My blog is 100% my code. It's kinda like a test bench for when I want to play with new PHP/MySQL techniques. I did skim over your post, started writing and then re-read your post ;) Currently I don't have an RSS Feed, I haven't looked into it yet but perhaps one day I'll have one. Can't wait to see what you do with your SigFeeder! Nice work
-
Submit blank form message user to fill in, and if not found display!?
SharkBait replied to suess0r's topic in PHP Coding Help
Do you pass the variables via $_GET, $_SESSION, $_COOKIE or another way? -
So you're looking for like a pagnation script but modify it for a date range? This is a little tutorial in pagnation: http://www.phpfreaks.com/tutorials/43/0.php You could modify it to work with dates instead of page limits. So you can make each page a month.
-
Submit blank form message user to fill in, and if not found display!?
SharkBait replied to suess0r's topic in PHP Coding Help
Prior to going to your second page you can try something like: [code] <?php $errMsg = ""; //get infor from dropdown if(!empty($_POST['mydropdown'])) { $value1 = $_POST['mydropdown]; } else { $errMsg .= "You forgot to select an option"; } if($errMsg == "") { // No errors continue to page 2 } else { // There were errors display them: echo $errMsg; } ?> [/code] If you need more explaination I can do so :) -
That's pretty neat. It's like the one I have in my signature. It reads from my Blog's tables and pulls the 3 more recent topics. Mine is like at most 20 lines of code and isn't as fancy as yours. But I like them, I think it is a great way to promote Blogs on forums that allow images. I was actually going to look into creating mine into a Wordpress plugin, but never got that far. Though I do have the tables and queries for pulling from Wordpress tables so perhaps I might continue it one day. If you can create themes/skins for your image that would definately be cool. Did you want feedback on the sigfeeder.com site too or?
-
So [code=php:0]is_nan()[/code] is like the opposite of [code=php:0]is_numeric()[/code] ? Though [code=php:0]is_numeric()[/code] will be true against Hexidecimal numbers which or numeric strings which I guess isn't what is being looked for :)
-
Or [code] <?php echo "<input type=\"text\" name=\"{$i[]}\">"; ?> [/code]
-
What does .innerHTML do?
-
Ok I have a small form with two radio buttons and a textarea. The two radio buttons have images associated to them. When a user selects a radio button, then the textarea is updated with the approrate string. I'm not sure what to look for. OnClick? and then somehow update the document.ElementId with text I need in the textarea? The idea is: User selects a logo, the HTML code for the selected image is created and presented to the user via the textarea. :)
-
Some people store the session_id() into a database and check against that. If it has changed, then the user isnt the same or they closed their browser.
-
If then statement not passing variables
SharkBait replied to anthonydamasco's topic in PHP Coding Help
Change your if to a switch() [code] <?php switch($nearestlocation) { case 'cherryhill': $branchemail ="karen.hartzel@accustaffing.com"; $branchphone ="856-482-2222"; break; case 'pennsauken': $branchemail ="pennsauken.office@accustaffing.com"; $branchphone ="856-662-2727" break; case 'burlington': $branchemail ="burlington.office@accustaffing.com"; $branchphone ="609-387-2900"; break; case 'woodburyheights': $branchemail ="woodbury.office@accustaffing.com"; $branchphone ="856-845-3900"; break; case 'atlanticcity' : $branchemail ="ac.office@accustaffing.com"; $branchphone ="609-344-1300"; break; case 'philadelphia': $branchemail ="philadelphia.office@accustaffing.com"; $branchphone ="215-568-2228"; break; case 'vineland': $branchemail ="vineland.office@accustaffing.com"; $branchphone ="856-794-8282"; break; } ?> [/code] See if that helps -
You can [code=php:0]substr($dir, 1, strlen($dir));[/code] So it starts at character 1 instead of character 0 which is the /
-
how to identify a returning user and run a code once for him
SharkBait replied to saeed_violinist's topic in PHP Coding Help
So something like: [code] <?php if(isset($_COOKIE['myCookie'])) { ShowPopUp(); } ?> [/code] [/code] -
what about [code=php:0] dirname($_SERVER['PHP_SELF']); [/code] ?
-
How old are their computers? 486s? :) I do understand that old timers have old carpentry equipment. There are some chisels i would never give up same goes for wood planes. :) If you're set on not using CSS then just add some more padding around the cells to space them out a bit. Add a bit o colour wouldnt hurt either. How I miss my woodworking days.
-
Oh I like the changes! I would take your portfolio links and make them hyperlinks. I like to be able to click on a link and not have to copy/paste to see it. Good job :)
-
The text is too close together and hard to tell where one paragraph starts and the next ends. To me, everything looks like text ads. The animated gif is cute, but isn't much of a logo. The site says its for Carpentry Finishing Tools, but the logo only says Finishing Tools. Google's AdSense Search Bar is in the wrong place, I would move it to the bottom of the site or one of the side columns Source Code: - Its one gigantic table, CSS is your friend learn it, love it, take it to dinner once in a while ;) - Oh it's even nested tables. Tables should be used for Tabular data, not layouts. Side Note: - Why is Amazon selling tools? Why can't they just stick to books?? :P
-
I like it. The top navigation perhaps need a hover or something for the links to stand out when you mouse over them? The bold font is a bit squished, perhaps increase the spacing between the letters.
-
You need to set your session like this: [code=php:0] $_SESSION['id'] = $id; [/code] On a line by itself in your code you are just displaying $_SESSION and whatever $id is equal to. To display all rows that the query found you can do: [code] <?php $result = mysql_query("SELECT * FROM jobs ORDER BY id"); echo "<table>"; //query displayed while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $id = $row['id']; // Create multi-dimension array to store all ids $_SESSION['id'][$i] = $id; // Display IDs in a table echo " <tr> <td width=\"200\">{$id}</td> </tr>"; $i++; } echo "</table>"; ?> [/code] Not sure if it is totally correct, but the idea is there :)
-
So that means SNMP service is not running or a firewall is blocking port 25 :)