-
Posts
191 -
Joined
-
Last visited
Everything posted by thedarkwinter
-
[SOLVED] whats the difference between file systems in Linux and windows
thedarkwinter replied to ludjer's topic in Linux
hi php itself will handle most of the file sytems differences, but there are some things you need to do, such as: 1. windows uses \ and linux uses / 2. windows uses drive letters, linux does not. Usually its better to use relatives paths. example: opening a file //Win: note the backslashes $file = fopen("c:\\temp\\myfile.txt", "r"); //Lin: $file = fopen("/tmp/myfile.txt", "r"); while my windows knowledge is pretty basic, feel free to ask more if i have missed something in your question. cheers, tdw -
you can use implode to convert the array to string (csv?) $output = implode(",", $myarray); hope that helps cheers, tdw
-
I don't have the patience either, but near the top i see the line if ($playerinfo[chatban] > 0){ That got anything to do with it? Otherwise, look for other >0's
-
pub cataloging site im working
thedarkwinter replied to thedarkwinter's topic in Beta Test Your Stuff!
Okay, so i reckon i've fixed all (or hopefully most) of that, you want to have another crack at it? cheers, tdw -
pub cataloging site im working
thedarkwinter replied to thedarkwinter's topic in Beta Test Your Stuff!
Thanks agentsteal A bit later i will try to figure out what all this means - but i can see that my site isn't very secure -
every row should have a specific index/id - right? so the query would be DELETE FROM mytable WHERE rowid=2; cheers, rdw
-
pub cataloging site im working
thedarkwinter replied to thedarkwinter's topic in Beta Test Your Stuff!
hehe, nice one!!! anything else? -
pub cataloging site im working
thedarkwinter replied to thedarkwinter's topic in Beta Test Your Stuff!
... and, sorry, i keep posting on my own post, i don't have I.E. does the js etc i've used work in IE, or is it messing it up? -
pub cataloging site im working
thedarkwinter replied to thedarkwinter's topic in Beta Test Your Stuff!
... sorry, you dont need to set up an account username: testuser password: testpass -
He guys Can you check out my site i'm working on at http://www.best-nights-out.com. I'm looking for any constructive criticism on design etc... but also security. Account security isn't really important cos i dont keep any personal details, but things like SQL injection.. (im backing up the DB now, so hack away ) cheers, tdw
-
If you are deleting everything in the table then "DELETE FROM mytable" will delete everything... And then do your insert
-
stripping left ended zeros off a number
thedarkwinter replied to cooldude832's topic in PHP Coding Help
or "j" rather for no leading zeros -
stripping left ended zeros off a number
thedarkwinter replied to cooldude832's topic in PHP Coding Help
date("l nS \of F Y") n = month number use d instead -
k i think ive got it this time you need to put else's before the second and third if because its defaulting to the last "else" if this doesn't work then maybe i stop giving stupid suggestions <?php /... if ($site1 <> 'All' && $tech1 == 'All') { $query ="SELECT * FROM helpdesk h WHERE h.site = '$site1'"; } else if ($site1 == 'All' && $tech1 <> 'All') { $query ="SELECT * FROM helpdesk h WHERE h.tech = '$tech1'"; } else if ($site1 == 'All' && $tech1 == 'All') { $query ="SELECT * FROM helpdesk h"; } else { $query ="SELECT * FROM helpdesk h WHERE h.tech = '$tech1' AND h.site = '$site1'"; }
-
Ok so maybe in the file that creates the XML, instead of echo'ing or print'ing, use a variable, say $xml so <?php $xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"; $xml .= "cdcsdcs"; // etc.. and then in your other php file, after you have included this file, just use the variable $xml. <?php //... include("xmlgenerator.php"); // your variable is now set xml_parse($xml) // or whatever echo $xml; im i following you now? hope so tdw
-
... also i think <> should be replaces with !=
-
[SOLVED] Partially replace a string with data from the same string...
thedarkwinter replied to lag's topic in PHP Coding Help
the str_replace function should work, replacing all occurences of the first param with the second using regex, can become more complicated (preg_replace). $input = str_replace("www.old.com", "www.new.com", $input); cheers, tdw -
Sorry, maybe its just me, but im a bit confused about what you are trying to do: Are you trying to parse the xml, or output it to the screen? What should you be getting?
-
i cant remember off hand how php deals with and's and or's and whether you need brackets or not, but try doing this <?php //... if ( ($site1 == 'All') and ($tech1 <> 'All') ) ... etc for all of those statements
-
I personally recommend Kubuntu, buts just personal preference... you're good to go either way. As far as Vista goes for security, i've got agree about AVG/Spybot, but are you going to dual boot? If so, make sure you install windows first, otherwise it overwrites the boot partition and makes getting back into Linux a rather long process. If you are deciding to go one way or the other, then i would advise going for Linux except if you are a big gaming fan... (although i have WoW etc running in linux) As for updates, in (k)ubuntu - theres a config file call /etc/apt/sources.list When the next version is released, you just edit that file and string replace "feisty" with "gutsy", and then apt-get dist-upgrade ... its as simple as that.
-
stripping left ended zeros off a number
thedarkwinter replied to cooldude832's topic in PHP Coding Help
try: $day = intval($day); should do the trick. cheers, tdw -
Well, can you split them into groups? When you say professions i assume you mean, IT, LAW etc... So can you have drop-down 1 with a class of professions, and drop down 2 with the sub-classes... if that makes sense... alternatively, you can use a listbox rather than a dropdown stating size in the select: <select size='10'> cheers, tdw
-
How to use a link to fill in <input></input> Forms
thedarkwinter replied to carefree's topic in PHP Coding Help
hehe ??? $_GET is the url parameters, not a database: so when your link goes to http://www.blah.com/page.php?name=myname $_GET["name"] would = myname in your case <?php //..... code code code echo "<input name=\"name\" maxlength=\"500\" style=\"width:150px; float:left\" size=\"500\" value='{$_GET["name"]}' /> ... should do the trick -
Hi try removing the ' ' around $DecimalRemovalStrength... so $DecimalRemovalStrength = 2.4244; $addstrength = "UPDATE userregistration SET Strength=Strength+$DecimalRemovalStrength WHERE UserID='{$_SESSION['Current_User']}'"; $resultresult = mysql_query($addstrength) or die(mysql_error()); If (mysql_affected_rows() == 0) { die('Error ID 0001, contact admin on the Civilian forums immediatly about this error!'); } cheers, tdw
-
Yes, or can generate a random new password and send that to them... cheers, tdw