TEENFRONT
-
Posts
338 -
Joined
-
Last visited
Never
Posts posted by TEENFRONT
-
-
-
Buy a newsletter script.
or code one yourself. Buying is easier... as a webmaster. :-)
-
The DATE mysql field format is YYYY-MM-DD
So could be wrong format issue.
-
debug time then lol
or die (mysqli_error ()); instead of or die ("Couldnt execute query2.");
post the error
-
does the folder have read/write acces CHMOD 777 ?
-
is the msql date field actually set to be a date/time field? or just a plain text field?
if its a specific date/time field then yes you need to insert the date/time in the correct format. if its just plaint text then you can insert whatever date.
Whats the error you get?
-
erm
if(!file_exists("references/". $_FILES["res"]["name"]))
Surley that should be
if(file_exists("references/". $_FILES["res"]["name"]))
-
confused.
Are you wanting to update the date? or checking to see if people can update it, as you dont want them to update it? If its the latter, hide the form field with the HIDDEN attribute.
other than that, i misunderstand what your trying to do?
-
Honestly
If your new to PHP, forum software is a good place to start.
Install a forum on your server, learn how it works, add a few mods to it etc get used to editing files, php etc.
Then learn how to add your own mods to the forum.
Reason i say this is cause its how i learnt, the forum has its own login system, its own gallery mods etc etc. Before you go ahead and make your own, id experiment with a forums pre-coded mods to get used to it. You can then dabble in creating your own pages based off the forum login system etc etc. trust me if works like a treat and you will be reading to code solo no time.
-
Hey
So what are you trying to do again? Got an example of the output that you want to do? is it like this
Adam 4 cases
Barry 5 cases
Caroline 2 cases
etc?
If so id run the first query to select * from table blah blah blah to give you $firstname $lastname etc etc
then in that query while() loop the 2nd query can just be select * from table where firstname = $firstname then use mysql_num_rows to count the rows per name.
The output $firstname $rows
-
"dbname" should be the db username, not the db name itself.
so you need the username. UNLESS the username IS the same as the database name... then your ok, but it should be working for you.
Create another user for the DB. you cpanel or other? set up a new user and give access to the db.
-
u know whats spooky...
Iv been doing this for the past 2 days.. the EXACT same thing and i too are wanting to change the names and bold the titles. Just not got to that bit yet, so il let you know when i get there. If not, maybe someone else can help untill then?
-
$sql = "Select * from $DB_TBLName";
change the wildcard * to certain column names so...
$sql = "Select column1, column2, column3 from $DB_TBLName";
-
if(!isset($row[$j])) $schema_insert .= "NULL".$sep;
Would ditching the word NULL not work?
-
erm..
is dbname the username? or just the dbname?
you should have 4 things
host - localhost, dbname - the database name, username - the db username, and pass - the db password.
if you mhave all those and not just dbname then maybe dbname doesnt have privialages set to access the db?
-
Hey
Thanks for that. Wooooooosh straight over my head.
Any additional help would be appreciated. This is a cut down version of my code, how would i implement kenrbnsn's example above?
while($r=mysql_fetch_array($result)) { $jobday = explode("/", $date[0]); echo $jobday[0]; echo $image; }
So the above will output this (say there is 6 records to loop through from the db)
22 img
22 img
21 img
21 img
20 img
20 img
i only want to show "img" if the date number if different to the previous date. kenrbnsn's example looks like what i need when i run it in isolation but i dont know how to fit that into my while loop to work?
-
use cookies?
-
Hey
Il jump straight in with my question. I have a while() loop outputting info from the db but im having trouble telling if a certain value has changed from the last loop, and if it is different i want to show an image. Showing an image is not the problem, just the telling if the value is different to the last loop. OK heres my code
$date = explode(" ", $date); // This splits the date and time (EG 22/01/08 22:15) field into just the date giving me $date[0] in this format DD/MM/YYYY $jobday = explode("/", $date[0]); // This splits the $date[0] to just the first set of numbers so it outputs DD (EG 22) as $jobday[0] echo $jobday[0];
so it loops through the results and $jobday[0] will output the following results in 6 loops along with an image EG
22 img
22 img
22 img
21 img
21 img
20 img
how do i tell if the number has changed between loops? So i only insert an img if the number is different from the last....sooo like this
22 img
22
22
21 img
21
20 img
I tried things like if($jobday[0] != $jobday[0]) but as $jobday[0] is set inside my loop, $jobday[0] with always equal $jobday[0]. And if i try setting $jobday[0] outside of the while loop then obviosly its not set right for each loop...
Any help????? Im going mad
-
buy a decent pc, get a decent net connection, install wamp ( if your wanting to run it on windows )
Done.
-
erm
im not a regex guy but im not sure your doing it right.
preg_match("/^[0-9]+$/", $_GET["m"]);
to ME that looks like your only trying to see if "m" has a number between 0 and 9.
AND you dont do anything with "$checkEventMonth". you just do the preg_match then leave the vars alone.
Im guessing you may mean to do this ?
if(($checkEventMonth && $checkEventDay && $checkEventYear) == 1) {
-
you need to connect to the db before running a query..not after
-
Best thing to do is to send from your server. Log the script into pop3 before you send. This way it actually send like an email and not just spam which msn/gmail/yahoo will just whack in the trash folder.
To send from hotmail to hotmail and gmail to gmail and yahoo to yahoo and vice versa..whatever, you need exta auth before sending from the relevent servers. Best thing is to send from your own domain name.
-
well it doesnt plainly mean "before the <html>" ..
EG
<?php if($var) { echo "weeeee"; header("location: http://"); } ?> <html>
That would error on headers already sent. as weeee is an ouput.
Do things in php with if and elses and vars and you wont need to output anything at all untill you actually want to show the visitor something.
-
Becareful with your little "bomb" script mate. Your host can and most likley will get seriosly pissed off with you if you run the script to send 100,000 emails especially on shared hosting.
The server would likley grind to a halt and various services will also stop and/or crash. Shared hosting only allows like 10% of the CPU to be used per account...this is likley to go waaaaay up and get your account banned. Depending on your host, they may also send you/threaten to send you a nasty SPAM bill..
Becareful when sending emails through php. Make sure you only send to opt-in addresses ( and you can prove it ) that way you dont get bummed by the host for spamming.
webmaster -> send mails to users
in PHP Coding Help
Posted
i was taking the mick outta his "as a webmaster" comment lol.
Reckon hes sat there in a big chair with a sign that says..."Webmaster" on his desk?
Only kidding!!! Yeah whipping together a php script to email users is easy using the mail() function, do a search. I think he also wants to a register script to register emails aswell so thats harder.. so "as a webmaster" not a "coder" buying one will be much easier. There cheap as the proverbial chips.