Jump to content

npsari

Members
  • Posts

    393
  • Joined

  • Last visited

Posts posted by npsari

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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 -

  6. 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

  7. 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!!!

  8. 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?

  9. 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";

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.