Jump to content

siwelis

Members
  • Posts

    135
  • Joined

  • Last visited

About siwelis

  • Birthday 12/19/1983

Profile Information

  • Gender
    Not Telling
  • Location
    Dundalk, Maryland (USA)

siwelis's Achievements

Member

Member (2/5)

0

Reputation

  1. Awesome! That was perfect. I was going to figure out the 301 later, but you even had that in there. Thank you!!! My only change was for my memory later changing the "&r=0" to "&null=0" so I'll remember when I look at it later. Thanks again!!!
  2. Hello Ladies and Gents, I'm getting back into coding after a year lapse. Got my first big project coming up soon too, but in the meantime, I'm working on my personal site and am LOST on a piece of code (Mod_Rewrite) that I gave up on years ago... Or did I give up?! No! I'm finally seeking help!!! #below masks URL successfully to html RewriteRule ^a/(.*)/(.*)\.html$ /a/$1/?req=read&article_title=$2 [L] #however, when I try to force that old URL to go to the HTML version, absolutely nothing happens RewriteRule ^a/(.*)/?req=read&article_title=(.*)$ /a/$1/$2.html [R] Does anyone see what I did wrong in the "Redirect" code below? Sweet lord almighty! I've tried to figure this out on my own numerous times over the years. Pray ye have the answer? Thank you in advance.
  3. seanlim, I ended up using the function array_key_exists you used. It's the first time I've ever used that function... I was trying to do that with isset but was having a hard time figuring it out... Nice to know there's a function for it already. Thank you for your help everyone!
  4. i think it will mostly depend on how friendly the GPS device is to your needs... this wordpress (php) plugin may give you some insight as far as connectivity to Garmin: http://wordpress.org/extend/plugins/garmin-connect/ Garmins can be pretty cheap sometimes... especially around black Friday. 70 w/ 1 yr maps, 99 for lifetime maps.
  5. how could i better declare $tagArray?
  6. This code seems to work fine in older versions of PHP, but in newer.. I get an error message... $tagArray = $temp = array(); $temp = explode(',', $words); foreach($temp as $tag){ $tagArray[trim($tag)]++; } The error message is: "Notice: Undefined index: 1..." I assume I can just turn off the error reporting, but I'd really rather fix the problem. Does anyone know what's going on? Thank you.
  7. i ended up deleting my database info in the php file, ran a script to see what databases were in there and copy/pasted from there... humbly enough, i must have made a mistake in the name of the database. the snippet of php script i used to list databases was this one: $link = mysql_connect('localhost', 'chexdcom_nhca', 'vdtfDCbZrZL4mnyE'); $db_list = mysql_list_dbs($link); while ($row = mysql_fetch_object($db_list)) { echo $row->Database . "\n"; } to my defense, i think my host may auto-prepend an identifying character set to the database names. thanks for your help fenway.
  8. Ye ol' pconnect access denial has attacked me. I come to you weathered and torn. Do ye have some ale? Ok, so here's what's happening. I'm trying to duplicate a table. No errors from the dump or the recreation of the sql database. $db_server = "localhost"; $db_user = "chio"; $db_db = "chio"; $db_pwd = "wallaBE"; $sql = mysql_pconnect('localhost', $db_db, $db_pwd); mysql_select_db($db_db, $sql) or die (mysql_error()); I know the problem isn't with the user or password, because I gave the new user global privileges and tested it on the original database with the same password. I even tried giving it database-level privileges. No luck. This happens for both my personal server and external web server, where the original tables can be accessed fine and the new ones can't. Anyone have any idea why I can't connect to the DB? Maybe a DB setting? Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'chio'@'localhost' (using password: YES) in /home/chio/public_html/chio/database.php on line 6 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/chio/public_html/chio/database.php on line 7 Access denied for user 'chio'@'localhost' (using password: YES) Local Server Info: Server version: 5.1.53-community-log MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $ External Server Info: Server version: 5.0.92-community-log MySQL client version: 4.1.22
  9. Yeah but I didn't find them. It seems like yesterday all I was finding was HTML editors... I searched again and found some! http://www.google.com/search?hl=en&safe=off&client=firefox-a&hs=Pu9&rls=org.mozilla%3Aen-US%3Aofficial&q=WYSIWYG+javascript&aq=f&aqi=g4g-m5&aql=&oq=&gs_rfai=
  10. Also, just to check they are not for whatever reason actually empty, this code insertion just before the form will tell you... echo '<br />Values: '.$nric.' '.$name.' '.$gender; ?> <form enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  11. <input type="text" id="firstname" name="firstname" value="<?php if (!empty($name)) echo $name; ?>" /><br /> <label for="lastname">Last name:</label> <input type="text" id="lastname" name="lastname" value="<?php if (!empty($nric)) echo $nric; ?>" /><br /> <label for="gender">Gender:</label> <select id="gender" name="gender"> <option value="M" <?php if (!empty($gender) && $gender == 'M') echo 'selected = "selected"'; ?>>Male</option> <option value="F" <?php if (!empty($gender) && $gender == 'F') echo 'selected = "selected"'; ?>>Female</option> i think curley brackets are needed. <input type="text" id="firstname" name="firstname" value="<?php if (!empty($name)){ echo $name; } ?>" /><br /> <label for="lastname">Last name:</label> <input type="text" id="lastname" name="lastname" value="<?php if (!empty($nric)){ echo $nric; } ?>" /><br /> <label for="gender">Gender:</label> <select id="gender" name="gender"> <option value="M" <?php if (!empty($gender) && $gender == 'M'){ echo 'selected = "selected"'; } ?>>Male</option> <option value="F" <?php if (!empty($gender) && $gender == 'F'){ echo 'selected = "selected"'; } ?>>Female</option>
  12. Does anyone know of any free GUI or WSIWYG text field scripts? For example; on eBay, the "HTML" view vs "Standard" which renders out HTML while editing on Blogger, the "Edit HTML" vs the "Compose" which even utilized standard hotkeys like CTRL+B for bold and when inserting an image it inserts it after uploading it. Wordpress's form text field is also very similar. Any guidance is much appreciated! Thank you!
  13. LOL! I'm glad PHP has no problem with that! - Thanks a lot guys! This clears up a LOT of issues I've had.
  14. For some reason I have some code like this that executes even when the variable isn't set. Is my syntax wrong? $setting = mysql_real_escape_string($_POST['setting']); //value posted for setting is "yes" if($setting = "correct"){ echo Hello; } //echo's Hello //works right ////OTHER SCENARIO $setting = mysql_real_escape_string($_POST['setting']); //value is not posted for setting if($set = "yes"){ echo Hello; } //Still echo's Hello I know I could just do a check to see if the variable is set and if not exit() or similar, but I really shouldn't have to... right? I don't mind workarounds, but I'd rather work it through.
  15. Has anyone heard of this? When I echo "<table border"... it comes out fine When I put it through mail( it removes the space to be "<tableborder" thus showing up incorrect
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.