User Profile

Collapse

Profile Sidebar

Collapse
simon2x1
simon2x1
Last Activity: Nov 22 '17, 08:58 AM
Joined: Dec 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Avoid duplicate value in PHP MySQL pagination with rand()

    I have a pagination that load more when I click on the load more button, which I got from the below URL http://makitweb.com/load-more-results-with-jqueryajax-and-php/

    Whenever I add RAND() it always duplicates the value.


    index.php

    Code:
    <?php
    
    $rowperpage = 10;
    
    $allcount_query = "SELECT count(*) as allcount FROM users order by id";
    $allcount_result = mysql_query($allcount_query);
    ...
    See more | Go to post

  • simon2x1
    started a topic strcasecmp not working with database value
    in PHP

    strcasecmp not working with database value

    am trying to compare two variable which I select from the value from database but it does not work please help me fix this below is the code.
    Code:
     
    $result1 = @mysql_query("SELECT * FROM events");
    $data1 = @mysql_fetch_array($result1);
    $dvenue1 = $data1['ven_title'];	
    
    $result = @mysql_query("SELECT * FROM events_location");
    $data = @mysql_fetch_array($result);
    $dvenue = $data['ven_title'];
    ...
    See more | Go to post

  • hide/show text area with textEditor depends on dropdown value

    I use the NicEdit(www.nic edit.com) text-editor on my Text Area which is working and the below code to hide and show text area after selecting a value in the drop down it will show the text area but this is what i need help with:

    1) i want the text area to show even before you select any value from the drop down.

    2) i want the Text editor(NicEdit) to show on all the text area after selecting a value from the drop down...
    See more | Go to post

  • Page display blank when using jquery, lightbox and prototype

    when I put the following link below my page disappear leaving the bgcolor alone I include JQuery.noConfli ct because my slider and the lightbox are not working together and I was told that I will replace $ with jQuery on which of the script lightbox, prototype or jquery I do know and am I to replace "someid" too with what exactly please I am newbie in this how can I fix this I will like it if the solve provided are edited on the code below...
    See more | Go to post

  • Jquery mobile app not appear well on desktop browsers

    below is my simple jquery mobile code, whenever i want to view it with HTML 5 capable desktop browser like safari 5.1.2 and firefox 9 it does not display well, it only show the text(page title etc) alone no colour no arrangement just white background how can i fix this and any suggestion on how to view the jquery mobile app.

    Code:
        <!DOCTYPE html>
    <html>
        <head>
        <title>Home</title>
    ...
    See more | Go to post

  • order a variable to display from the highest to the lowest

    my code below will echo the position of the user if the number($nm) fallbetween the range so let say i have $nm = 10,4,3,3,1 respectively the position will be(staff,staff, staff,marketer, staff) instead of(marketer,sta ff,staff,staff, staff) how can i arrange so that marketer come first(marketer, staff,staff,sta ff,staff).

    Code:
    $query = "SELECT DISTINCT username,num FROM user ORDER BY num DESC LIMIT 5";
    $result = mysql_query
    ...
    See more | Go to post

  • simon2x1
    started a topic how to changes my variable from seconds to minutes
    in PHP

    how to changes my variable from seconds to minutes

    how to changes my variable from seconds to minutes
    in my code below i substract the previous date of the user john in the field name date_time from the current date CURRENT_TIMESTA MP the variable $newdate echo
    the answer in seconds only how can i make it to display from seconds to minutes from minutes to hours then hours to days

    Code:
    $query1 = "SELECT (CURRENT_TIMESTAMP - date_time) AS dnew, date_time FROM user
    ...
    See more | Go to post

  • simon2x1
    started a topic How to round the corners of a box using CSS?

    How to round the corners of a box using CSS?

    The css below will create a rectangle fill it with
    these color #F6F6F6 but i want to curve the edge of
    the rectangle.

    Code:
    .bold {
    border: solid 1px #e7e7e7; 
    background-color: #F6F6F6;}
    See more | Go to post

  • simon2x1
    started a topic How to resize selected image from database?
    in PHP

    How to resize selected image from database?

    The code below will resize an image to 50*50 but whenever i select the name of the image in my database and put it like these $filename = 'folder/$imagename'; it does not work how can i fix these.

    Code:
    <?php
    $filename = 'folder/Aizen.jpg';
    
    $width = 50;
    $height = 50;
    
    header('Content-type: image/jpeg');
    list($width_orig, $height_orig) = getimagesize($filename);
    
    $ratio_orig
    ...
    See more | Go to post

  • simon2x1
    replied to How to apply SMTP Authentication to my mail?
    in PHP
    what if i do it like this will it work
    Code:
      <?php
             if(isset($_POST['submit'])){
         If(empty($_POST['email'])) {
         echo 'Please fill in the required fields!';
      
             }else{
      
                 $email_to = $_POST['email'];
                 $sql = "SELECT statue FROM statue WHERE mail='$email_to'";
                 $result = mysql_query($sql);
    ...
    See more | Go to post

    Leave a comment:


  • simon2x1
    started a topic How to apply SMTP Authentication to my mail?
    in PHP

    How to apply SMTP Authentication to my mail?

    The code below is my mail code that send passsword to mail
    but it does not go to yahoo and gmail i want to add STMP
    authentication to it how can i do that.

    Code:
    <?php
    		if(isset($_POST['submit'])){
    	If(empty($_POST['email'])) {
    	echo 'Please fill in the required fields!';
    	
    		}else{
    			
    			$email_to = $_POST['email'];
    			$sql = "SELECT statue FROM statue
    ...
    See more | Go to post

  • simon2x1
    started a topic How to fix my search issue
    in PHP

    How to fix my search issue

    The code below is my search code, if i search for the username john it will display it but if i search JOHN, joh, jo, or j it will echo no match was found how can i fix that.

    Code:
    If(empty($_POST['search_q'])){
    
    			echo "Enter search word";
    
    			}else{
    
    			$term = $_POST["search_q"];
    			$result = @mysql_query("SELECT * FROM user WHERE name like '%$term%' ",$dbconnect);
    ...
    See more | Go to post

  • simon2x1
    started a topic How to fix my link problem
    in PHP

    How to fix my link problem

    when i test the code below on my localhost it will display the name of the url which i select from my database but while online when move my mouse to the link it will display my domain name and the link eg http//:mydomainname.c om/www.thelink.com how can i fix these.

    Code:
    $result = @mysql_query("SELECT * FROM user");
    $line = mysql_fetch_array($result);
    $dweb = $line[web];
    $dbuz = $line[title];
    ...
    See more | Go to post

  • simon2x1
    started a topic How to select a value from the least
    in PHP

    How to select a value from the least

    the code below will diplay the following:

    1 john
    2 dave
    3 mark

    i want it to start from the least like this

    3 mark
    2 dave
    1 john

    Code:
    $result = mysql_query("SELECT * FROM users") or die(mysql_error());
    $count = 0;
    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
    				
    $num = $line[id];
    $person = $line[user
    ...
    See more | Go to post

  • simon2x1
    started a topic how to increment a variable inserted in database
    in PHP

    how to increment a variable inserted in database

    I want to increment the variable number when ever there is a insertion to the database for the first insertion it should be 001 the next person or insertion should be 002.

    Code:
    
    <?php
    
    $user =  ($_POST['person']);
    $number =  "001"; //what to increament these
    
    mysql_query("INSERT INTO users (person, user_num) VALUES ('$user','$number')") or die(mysql_error());
    ...
    See more | Go to post

  • how to fix an onclick problem in a tab content

    The problem is this my submit button did not send to this $_POST['submit'] in my php code whether it because of the false in my button which i just add(<input type="submit" name="submit" value="Submit" onClick="show_c ontent('div_2') ; return false;"/>)how can i fix this thanks

    Code:
    <html>
    <head>
    <title>home</title>
    </head>
    ...
    See more | Go to post

  • simon2x1
    replied to How to fix my date problem
    in PHP
    what i want is this the date variable which i insert and select back in my table to echo should display the correct date like today date is 2005-10-27 when i insert the variable date and select to echo it display this 2012-10-20 also my U_date field i choose date for the type lastly how can i make the date to look like this 10-June-2010 not like this 10-6-2010
    Code:
     $name= ($_POST['name']);
     $u_date = date ('h.m.Y');
    ...
    See more | Go to post

    Leave a comment:


  • simon2x1
    replied to How to fix my date problem
    in PHP
    what i want is this the date variable which i insert and select back in my table to echo should display the correct date like today date is 2005-10-27 when i insert the variable date and select to echo it display this 2012-10-20 also my U_date field i choose date for the type lastly how can i make the date to look like this 10-June-2010 not like this 10-6-2010
    Code:
     $name= ($_POST['name']);
     $u_date = date ('h.m.Y');
    ...
    See more | Go to post

    Leave a comment:


  • simon2x1
    started a topic How to fix my date problem
    in PHP

    How to fix my date problem

    the code below is met to insert the variable u_date to my table and echo it but when ever i echo the date from the table i select it, it's not also correct ever when my system date is correct and secondly i want the date should look like this 10-June-2010 not like this 10-6-2010.

    Code:
    $name= ($_POST['name']);
    $u_date = date ('h.m.Y');
    
    mysql_query("INSERT INTO user
    (name, u_date) VALUES('"
    ...
    See more | Go to post

  • simon2x1
    replied to how to pass variable to a second tab
    in PHP
    i want to thank you for your reply i will appreciate it if i will be able to use JavaScript to solve this problem using this php code make me more confess please i need the java script version that can solve this problem
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...