
markbett
Members-
Posts
133 -
Joined
-
Last visited
Never
Everything posted by markbett
-
as i stated earlier the code you keep trying to push is wrong because it just wont work... what happens when something is posted on the 31st and today is the 1st? you do need to account for days months and years so you need to use the stringtotime... why you both refuse to accept this fact is beyond me... its fast simple and less lines of code
-
Parse error: syntax error, unexpected T_STRING in ...
markbett replied to RSprinkel's topic in PHP Coding Help
your missing a " in one of your sql queries... ;-) took me about 15 seconds to find... -
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
does anyoen have any alternative ideas for how i could work this code?? im just getting stuck on how i know what the name of the form fields im fetchign data from will be.... if there is a better way then let me know...... -
does the page call to the db before the information is written to the database? if so then you cannt expect the DB to know what info is going to be there.... if this is the case then have the landing page jump go somewhere which will then redirect to the show list so it will do the "refresh" silently during the redirect...
-
its because in addition to the spaces you add in what you type... your code you have adds <p> paragraph breaks
-
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
[code] case "proc_guests": $i='1'; $guests=3; $guestnum1="test"; $guestnum2="tesingt"; $guestnum3="tessafasfd sdft"; //$guests=mysql_real_escape_string($_POST['guests']); while($i<=$guests){ echo "$guestnum.$i"; $i++; } break;[/code] which is a variation of your example outputted= .1.2.3 without the " is outputs 123 -
thats what you get when you google search for php and TAR
-
check your mail server logs to see what happened to your email
-
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
this isnt right because its not making me a new variable... its putting data in a variable... i need to be able to know that $guest1_name exists and guest1_email exists and i need to be able to process all these variables until all the guests are through.... but if there were 100 guests then that means i would have to write the code out for 100 propeple and then counter to stop on time but thats a lot of bloat.... so im not trying to load data into a variable... im trying to make the variables on the fly..... -
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
arent your quotes in the wrong places?? shoulndt it read $_POST['$guestnum.$i'] witht the quotes outside both vars? -
did you start the session before you tried to destroy it? you can derstroy somethign that never existed
-
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
any ideas? -
http://www.devshed.com/c/a/PHP/TAR-File-Management-With-PHP-Archive-Tar/ does that help
-
with php or on your computer?
-
which works great for looking at how far apart DAYS are but you dont take into account the year or month... so in your code comparing jan 3 with june 5 would result in true when it should be false which is why you should compare them as unixtime
-
determine variable names for dynamic variables *RESOLVED*
markbett replied to markbett's topic in PHP Coding Help
http://207.5.19.133/sbqa/event_viewer.php?req=view_event&event_id=41 click the I want to go and then on the next page make the dropdown selector anything other then 0 and you will see whats going on.... right now those form values all have the same name... thats what i need to change but i need to do it in a manner so when i post that second form i know what variables im reading and what they are called.... -
you have arrays within arrays (multi dimen.) make an if statement to determine which ones get included then append them into the outter array accordingly...
-
http://www.w3schools.com/php/php_arrays.asp http://www.tizag.com/phpT/arrays.php first link is probably better.... if you dont want orderdate to appear throw an if in front of it so if"orderdate=="1" then{ run code }
-
http://www.w3schools.com/php/func_date_strtotime.asp
-
you need to convert all your date to string of time like i said
-
$time = time(); $time_diff = round(($stop_time-$time)/86400); compare time_diff to 7
-
Limit the number of rows created in a database? *SOLVED*
markbett replied to crzyman's topic in PHP Coding Help
when you say its "not working" what exactly is not working? is it adding 6th rows? is it not updating anything?? for sanity and resilance I would acctually make a small mode and change the: $num_rows == "5" to $num_rows >= "5" the reason for this is IF for some odd reason a 6th or 7th row ever appeared then it would continue to act in the manner you want.... the way you have the code now.. it will only overwrite when it hits five but if 5 were somehow bypassed then your code does nothing.... -
ok put your code in code tags so we can tell what is what... did you post the actual text of the message that is sent??
-
determine variable names for dynamic variables *RESOLVED*
markbett posted a topic in PHP Coding Help
heres the situation... a form is posted by a user saying i am bringing X number of guests with me to an event.... they are brought to a new page that have x number of boxes so tehy can enter in the name and email address of the people they are bringing...... how do i know how to get these variables back because i dont know what they are on the form because i dont know what X is.... the form i can just have it echo field_id=guest<?echo guest_num?> but once that is posted how do i know how many of those variables i am going to be looking for? can i make the variables in my php code dynamic as in if($guest<?echo guest_num?> -
take youre dates and convert them to stringoftime subtract the date in question from time() which is the time at that exact moment... what you are left with is the time difference in seconds between now and the date the record has associated to it.... to figure out if it is 7 days divide by 86400 (the number of seconds in a day (ohh that couldbe wrong it might be 84600) and you will end up with a number of days.... if that number is less then or equal to 7 then it happened in the last 7 days.....