PC Nerd
Members-
Posts
1,122 -
Joined
-
Last visited
Never
Everything posted by PC Nerd
-
[SOLVED] Multidimensional Arrays = retreiving index as text
PC Nerd replied to PC Nerd's topic in PHP Coding Help
hmmm, ok, thankx -
if you want t oreload, then id use javascript, especially on timeout etc.
-
isset($cf_455) and empty($cf_455) might help
-
only way is to create a cookie, that doesnt expire, which i do beleive expires after teh browser is closed. you may be able to selet time rembered for, and then set a cookie expire time for that, or simply make it sooooo far away into teh future, that the person will never expire..... In the file, simply go: if(isset($_COKIE['Set_User) || isset($_COOKIE['set_Pass'])) { etc. gdlk
-
hi, Im looking for a way to get php to read through a html or shtml document, but using the W3C DOM. It would need to have the childNode functions etc. Is there anythign that woudl allo wme to do this? or alternately retrive html tage attributes, according to a certain criteria.? eg: <div id='retrive'> </div> javascript: getElementById("retrive"); is there an equivelent in php? thanks
-
the other thing to keep in mind, is if your storing things in your session, that really need to be in the database. I have had this problem with my game, where i place like Points in teh session, but forget to update teh DB, so i end up having everything working for that on euser, btu the other users arent experienceing anything. Keep that in mind as well
-
also, maybe use frames or similar? gdlk
-
New table created from variable. Can it be done?
PC Nerd replied to Potatis's topic in PHP Coding Help
i often simply give a record multiple id's eg, if i was to have a message sectionin my site, then instead of habing a message table for every user, then i create the uniqu messsage id, the user-Id of who its to, and then the chain id, which is like reply... eg chain id "2" means its a reply to id "1". Hope this helps -
[SOLVED] Multidimensional Arrays = retreiving index as text
PC Nerd replied to PC Nerd's topic in PHP Coding Help
ok, i think ive fixed it, thankx though for the record... Field would contain the Array object. basically, im looking for a way to actually pront out the variable/array name.... eg: $variable = "test"; echo $variable; = "test" i want a way for it to output: "variable" or whaterver thanks -
ok, withouth going through your code, i hope hte below code works. $Query = QUERY STUFF; $New_Array = array(); if($QUERY = "TEST") { $New_Array[''][''] = ""; # rearranging your indexes, or simply adding the content } then there is sort($New_Array, ASC) or something, but im not sure about eh actual arguments gdlk
-
thanks ill look into these functions
-
yes, however the idea of an array is to be able to easily manage that arge amount of data. If youve got heaps of variables, then its harder to read your code later on. What are you doing with your $_POST data? sometimes its helpful to use variables, other times it seasier to use teh array.
-
Hi, Im looking for a way, to rename files on my server. eg /me/files/FILE1.mp3 i want me script to be able to shange that to /me/files/MUSIC.mp3 also, is it possible for the php script to change the location of the file? eg the above file moved to /me/music/uploads/MUSIC.mp3 is that possible? and if so how? thanks in advance
-
well you would need to have another php file, that has like the code to delete the file etc, as in pass that drop down value ( file_name), and delete it im not sure about the deleting.... however: if(empty($_POST['Delete_Field'])) {header("location:-----");} function delete_file($file_Name) { DELETE FILE HERE } then go $file = $_POST['Delete_Field']; delete_file($file); i dont know much about functions though gdlk
-
yesh, i think its in header() information, im not sure.....if you search for a post started by me..... about forcing a download... about 4 weeks ago, i think that answer was there.... worry i can be of much more help
-
um, do validation.... like if(empty($field1)) {} then once you know what is empty, you can query etc from there thats the only way
-
echo "<option value = '".$r['Id']."'>".$r['Id']."</option>\n"; i havent a clue what that might do to help, but i know that if i sometimes rewrite my code again, the error disapears.... its really weird
-
also, at the end of every look, maybe go unset($date); or maybe create an array value, that will store all your results?
-
no, its available from 4.1.1 onwards i beleive, but its main functionality update was in v5. i might be wrong. most host these daysoffer at least 4.1.1
-
[SOLVED] Web Crawler > Preventing never ending loop
PC Nerd replied to drewbee's topic in PHP Coding Help
im not too sure, butmaybe run a timeout, like i dunno, have 2 conditions in the loop: while all pages havent been catalogued && page_time_running > 30 seconds might work -
ive got it working, thanks though
-
ok, tech got back, and said to explicitly state teh mailserver as localhost, however im having trouble finding a way. does anyone know how to do this? thanks
-
hi. ive got this small site, and theres two different forms, which both send emails to an email address. the first set of code below works, however the second one doesnt. the second one returns things like the actual mailserver url, and the message body only has "0", probably boolean/"false". Ive got the tech guys at me server looking into it, but im wondering if its with my code. if anyone has any ideas on whats happening. i would really appreciate your help. thanks $To = "email"; $From = "email"; $Name = "NAME"; $Title = "TITLE"; $Message = "MESSAGE"; $Subject = "Web Site Inquiry: \"".$Title."\""; $Body = $Name." has sent an email from the website. The message is below. You can reply to their email, simply by clicking on the reply button / link in your email program.<br><br><br><br><br><br>Message:<br><br><br>".$Message."<br><br><br>"; $Header = "From:".$From; $Mail_Sent = @mail($To, $Subject, $Message, $Header) or die("Email Failed to send. Please contact the Webmaster at Webmaster@horizonaccounting.com. We apologies for any inconveinience."); $message = "Test ing this email"; $to = "isjackawesome@gmail.com"; $subject = "Details Update"; $email = mail($to, $subject, $message, "From:horizon.accounting@gmail.com") or die("Email failed to send"); please note, that the working email, the first set...... uses $_POST data, and not static variables, for the first set of variables... however ive simply replaced its value. thanks