Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. as for the prefixing of the domain name, i think the WYSIWYG you have maybe messing it up, i am using Firefox and didn't even see the WYSIWYG !
  2. Erm.. So if you have 2 members each have 6 items you want.. how many rows ? 12 but 2 ??? your asking to have 1 table with different records set!
  3. the magic quotes fix should work anytime you have that problem, if magic quotes are off the code will still work, but read this for more info
  4. can you post your directory structor.. as a guess you have a this 1/manager/imageupload.php then i assume you have upload/ <-- you want them here if so you need to go back twice $upload_dir = dirname(__FILE__)."/../../uploads/"
  5. try this <?php /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */ $itemtitle = $HTTP_POST_VARS['itemtitle']; $a = $HTTP_POST_VARS['a']; $message = $HTTP_POST_VARS['message']; //magic quotes fix $message= (get_magic_quotes_gpc())?stripslashes($message):$message; } ?> <?php echo $itemtitle ?><p> <?php echo $message ?>
  6. try $upload_dir = dirname(__FILE__)."/../uploads/" dirname(__FILE__) = works out the folder the PHP file in
  7. test didn't show a WYSIWYG but i pasted in <IMG class=screenshot height=240 alt="Earth Hour website" src="http://www.google.co.uk/intl/en_uk/earthhour/screenshot.jpg" width=300> and the quotes were escaped but other than that it should of worked, no prefix of the domain name without seeing any code i would guess your using addslashes(); or have magic quotes on
  8. Okay.. simple table 20 fields (with a unique ID) 20000000 records your ID is index'd and an autonumber primary field.. you search/link only by ID, not a problem Now lets say you have a 8 inner join linking unindex'd fields using a select in a select.. probably going to get a timeout.. okay if they were index'd 8 joins (or even the select in a select by itself) may of killed it anyways but you get the point
  9. i am not 100% sure what your asking, sounds like a redirect in which case you could use header("location: http://blar"); or javascript or meta tags
  10. I hope his not using xampp for public access
  11. Not if the site doesn't use the database, if it does use the database it depends on the design and use.. very hard to say but yes more data slows it down, (badly if it has a bad design)
  12. part 2 add list($scallops, $shrimp, $oysters, $lobster) = split(':',$inline); $fish = $_POST['fish'];//ADD this line if ($fish == 'scallops') {
  13. as you now know.. that won't work.. you need to use the file path not the web path So if the imageupload.php file is on the top level and then you have a folder called uploads ie http://wwww.mysite.com/uploads/imageupload.php <-- php file http://wwww.mysite.com/uploads/ <--put uploads here change $upload_dir to $upload_dir = dirname(__FILE__)."/uploads/"
  14. Okay.. depends on the allocated space.. you can put as much data in until the drive it full!
  15. read links http://www.createafreewebsite.net/phpmysql/insert.html http://uk2.php.net/manual/en/function.mysql-query.php http://dev.mysql.com/doc/refman/5.0/en/insert.html
  16. its setup via a phone companie, that reads data from a phone account, if your using php the company with give your a link to a database or xml file
  17. yes, using javascript something like this onchage='document.formname.action=this.value;';
  18. Depends on the size of your harddrive..
  19. for testing you could tweak your hosts file start->run %systemroot%\system32\drivers\etc\hosts MAKE A BACKUP your hosts file should something like this now if you change it to Now you need to edit the httpd.conf file, i don't use xampp, but if you look in th \xampp\apache\ folder you should find it, BACKIT UP! open it and add a virtual host IE reboot apache and then goto http://images.localhost that should work
  20. if ( empty($_GET['wid']) ) { $wid=1; }
  21. Create another field called `Seconds` and run this script, confirm the seconds are correct then delete the minutes field and rename the seconds to minutes I have included a basic database for the example <?php /* CREATE TABLE `test` ( `ID` varchar(10) character set latin1 NOT NULL, `Minutes` varchar(15) character set latin1 NOT NULL, `Seconds` varchar(15) character set latin1 NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `test` (`ID`, `Minutes`, `Seconds`) VALUES ('1', '3:06', ''), ('2', '2:16', ''), ('3', '5:6', ''), ('4', '7:36', ''); */ mysql_connect("localhost", "user", "pass") or die(mysql_error()); mysql_select_db("test") or die( "Unable to select database"); $table = "test"; $query="SELECT ID,Minutes FROM $table"; $result = mysql_query($query)or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { $ID = $row['ID']; list($m, $s) = split(":",$row['Minutes']); $sec = ($m*60)+$s; $query="UPDATE $table SET Seconds='$sec' WHERE ID = $ID"; mysql_query($query)or die(mysql_error()); } ?>
  22. you could do it a few ways <?php $cc = "0000000000000000"; echo substr($cc, 0, 4)." ".substr($cc, 4, 4)." ".substr($cc, 8, 4)." ".substr($cc, 12, 4); ?> <?php $cc = "0000000000000000"; $cc = preg_replace('/(\d{4,4})/', '\1 ', $cc); ?>
  23. read comments <?php //Set Link from function $link = menu_item_link($mid); //Set css_id from function using link $css_id = strtolower(str_replace(' ', '_', strip_tags($link))); //Set css_id from function using link $css_id = strtolower(str_replace('ş', 's', strip_tags($link))); //Set css_id from function using link $css_id = strtolower(str_replace('ü', 'u', strip_tags($link))); ?> so to sum up the first 2 replaces are not used... as you refer back to $link try this <?php //Set Link from function $link = menu_item_link($mid); //Set css_id from function using link $css_id = $link; //set $css_id from $css_id $css_id = strtolower(str_replace(' ', '_', strip_tags($css_id))); //set $css_id from $css_id $css_id = strtolower(str_replace('ş', 's', strip_tags($css_id))); //set $css_id from $css_id $css_id = strtolower(str_replace('ü', 'u', strip_tags($css_id))); ?>
  24. erm.. if you intrested.. read up on session (if you get stuck swapping cookies for sessions start a new thread) maybe read into the isset() function and $_POST and combine to have the login.php and logout.php script contained in the same file.. other than that i think we're done
×
×
  • 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.