-
Posts
393 -
Joined
-
Last visited
Posts posted by npsari
-
-
I am uploading all images in one folder in my website, and storing the image names in a raw called Image
I am not so sure if that is correct to do
are you going to upload all images in one folder
or you create s eparate folder for each user
-
I read it actually, cant deny i didnt understand much, but thanks for the help
it works now
-
ohh, nice, i try it now
Just a little extra question
setcookie("try", "Me Try", time()+3600, "example.com");
the above cookie expires in 1 day i think
what if i want to make it 1 week
Can you tell me what to use
-
I was reading, and did not manage to find this little info yet
so, it should be like that?
setcookie("try", "Me Try", time()+3600, "/", http://www.example.com);
cus iam getting erros
-
Hi there,
I set up a php page which has this little code
<?php setcookie("try", "Me Try", time()+3600); ?>
then, when i try to read it from any other directory, i cant
<? echo "Welcome " . $_COOKIE["try"] . "!"; ?>
I only can read it if i upload the script in the same directory where the cookie was set
How can i make a cookie, where all pages can read it, is that possible
-
would love to help you out
I am not sure what php.ini is
if you can explain, hit me
anyway, Youtube takes an hour to upload a 100 MB video
Perhaps you should wait like half a day to see things working
cus the sizes you are dealing with are huge
even Veoh takes time for such sizes, but they use a windows program which you can pause and restart
-
Hi there users,!
I recently moved servers, from a shared one to a dedicated one
In my shared one, the emails i send used to arrive fast, and they do arrive!
But in my new server now, my sites cant send emails so fast, and it takes 3 hours to arrive at yahoo, and it never arrives at hotmail
I use this normal mailing script...
if(mail($sendto, $subject, $message, "From: $sender")){ print ("Your message has been sent, Thank you"); }else{ print"Message could not be submitted due to an error!"; }
Do you know how can i make things nice like before
Why is hotmail blocking my emails, how can i fix all this
-
lol, yes, cus some pages does not have any images
should have said around 50, not sure exactly
but they are quite many
-
ohh, thanks
well, i can see there are many ways of doing it
yep, i think ill propably edit all my files with notepad and make another folder name (images)
iam lucky i only have only about 60 pages now or less actually
-
Hi guys
I have my images in a folder called h-images
i.e. www.mysite.com/h-images/
I link to my images simply by <IMG src="/h-images/1.gif" border="0">
I have 100 webpages, and increasing
I am worried that one day, whoever is in change! might decide that folders can not contain -
So, i will have to change my whole pages because of that
is this possible that one day in the future, folders must not contain -
-
great,
thanks, i was courius for the future
-
hmm, can you show me how to add a 3rd table if that is possible
What if i want to add the table phpbb_posts so i can select a row called post_time
is it hard to add to the above code
-
Now things are working
thanks for the support
i appreciated it much!
byez
-
thanks for the code
i tried it, everything works ok, however, the image is not showing
The image row is called user_avatar and it is available in the table phpbb_users
do you know what should i add to the code you sent me
-
Allow me to introduce you to my database...
I have a table called phpbb_topics
and a table called phpbb_users
I want to display the latest 10 topics (and the image of who posted them)
I did this but doesnt work!
$q = "SELECT * FROM phpbb_topics, phpbb_users ORDER BY topic_last_post_id DESC LIMIT 10;"; $res = @mysql_query($q); while($r = @mysql_fetch_array($res)){ print "<IMG src=\"/forums/images/avatars/$r[user_avatar]\">"; echo "<a href='/forums/viewtopic.php?t={$r['topic_id']}'>{$r['topic_title']}</a><br>"; print "Views: $r[topic_views]"; print " "; print "Replies: $r[topic_replies]"; }
phpbb_users has a row called user_id
and phpbb_topics has a row called topic_poster (These are the 2 equal ones)
Can you show me how to write the $q please
-
Guys, i run 3 websites which hve many users, kinda like phpfreaks here (traffic each)
is this a good server to host my 3 sites:
80 gigs storage, 1,500 gigs of bandwidth
1 gig of Ram to yourself
5 IP addresses
Full root access
please let me know
-
thank you, i will work on it
-
ohh, that is new to me the two dots thing ..
So, my file with the details is in www/details/index.php
and i want to link to it from www/codes/sub/index.php
what should the include be like
include ("???");
it will be great if you show me plz
-
it worked now cus i put them in the same folder
Does it have to be on the same folder?
what if i put the whole link...
include ("http://www.example.com/details/index.php");
will this work somehow
-
I put an index.php in a folder called details. The index.php contains only the following...
<?
$Connection='localhost';
$Name='TheName';
$Password='ThePassword';
$Database='DatabaseName';
?>
Then, i connect to a database in any other page doing this...
<?
include"/details/index.php";
$con=mysql_connect("$Code", "$Name", "$Password");
mysql_select_db("$Database", $con);
?>
But it doesnt work and doesnt connect succesfully, why!!!
-
Can this be due to that many people are linking to my site with an image which is also uploaded at my site
can that consume CPU usage
-
The hosting company shut my site down, i told them "but i have plenty of bandwidth", they said this...
You have plenty of bandwidth, your account just can't cause the server
load to skyrocket. Normal load is ~ 3-5. Your site caused it to exceed
39, so it was suspended to maintain proper performance for everyone
else. If this is normal for your site, you will need to look at dedicated
services. Thanks.
Can someone explain it in easy words, cus i dont understand what all that means
i understand that i need to get my dedicated server for better performance, but what is the problem my site caused?
-
I am using this long code to get statistics on how many people each day added an email, or an image, or both (hence activated)
The way i done it, seems a little complicated
Is there a better way, because i want to do this for the last 10 days!
$Date_Today = date("Y/m/d"); $q1 = "SELECT * FROM profile WHERE Date = '$Date_Today' "; $res1 = @mysql_query($q1,$con); $All_Today = mysql_num_rows($res1); print"Today: $All_Today"; $q2 = "SELECT * FROM profile WHERE Date = '$Date_Today' AND Image1 !='' AND Email ='' "; $res2 = @mysql_query($q2,$con); $Only_Image = mysql_num_rows($res2); print"Only Image: $Only_Image"; $q3 = "SELECT * FROM profile WHERE Date = '$Date_Today' AND Email !='' AND Image1 ='' "; $res3 = @mysql_query($q3,$con); $Only_Email = mysql_num_rows($res3); print"Only Email: $Only_Email"; $q4 = "SELECT * FROM profile WHERE Date = '$Date_Today' AND Email !='' AND Image1 !='' "; $res4 = @mysql_query($q4,$con); $Activated = mysql_num_rows($res4); print"Activated: $Activated"; $Date_Yesterday = date("Y-m-d",mktime(0,0,0,date("m") ,date("d")-1,date("Y"))); $q5 = "SELECT * FROM profile WHERE Date = '$Date_Yesterday' "; $res5 = @mysql_query($q5,$con); $All_Today2 = mysql_num_rows($res5); print"Yesterday: $All_Today2"; $q6 = "SELECT * FROM profile WHERE Date = '$Date_Yesterday' AND Image1 !='' AND Email ='' "; $res6 = @mysql_query($q6,$con); $Only_Image2 = mysql_num_rows($res6); print"Only Image: $Only_Image2"; $q7 = "SELECT * FROM profile WHERE Date = '$Date_Yesterday' AND Email !='' AND Image1 ='' "; $res7 = @mysql_query($q7,$con); $Only_Email2 = mysql_num_rows($res7); print"Only Email: $Only_Email2"; $q8 = "SELECT * FROM profile WHERE Date = '$Date_Yesterday' AND Email !='' AND Image1 !='' "; $res8 = @mysql_query($q8,$con); $Activated2 = mysql_num_rows($res8); print"Activated: $Activated2";
-
wow, cool, solved it out
thanks hostfreak
[SOLVED] ID or id !!!
in PHP Coding Help
Posted
In my mySQL table, i put created primary key as ID
is it a problem that it is capital letters, should i have made it id? if yes, why?
Because now when someone tries to see a topic for example, he types
www.example.com/topics.php?ID=3
Will capital letters be disabled one day in browsers!!!, that would be a disaster, please help with some info