Jump to content

london77

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

london77's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have some files stored in mysql db. I have created a web page which shows the list of tutorials from db. at first i was creating a separate php page for each tutorial, but later i have decided that it would be easier and simpler if i can create one php page and whenever i click the tutorials it will change the content of this page. example: when i click "tut002" from list. it will change the content of tutorials.php . I have these tutorials in .html format here is the code i have in turorials.php once again, whenever i click a tutorial this include part needs to change automatically to whatever i click echo '<div class="content">'; include ("inc/tut001.html"); echo '</div>'; it will be really appreciated if you have a sample code for this. sorry for my english. thank to whoever interested in this matter.
  2. Hello, I have created database "acc" which stores my income and expenses in a table called "inex" . I want to see the monthly total expense and incomes in view.php i tried to do it but messed up with the code as i am a newbie. does anyone know a sample code for this kinda purpose or help me with the query? thanks alot
  3. ok, thnks for the quick reply, i was trying to put some restriction to a page, and if user is not registered he wont be able to see it, even the admin menu which lays right side.
  4. Hi, I am wondering if "echo" can contain <?php ?> in it. such as echo ''<?php include ("inc/menu.html"); ?>"; if it cannot contain, then how can make it contain "include ()" ? thanks in advance
  5. thanks again .. great help now dealing with it.
  6. Hi Dan, thanks for the reply but I must say im newbie, trying to learn it. So, just putting there Month(); will not be clear for me. I myself tried to do it by creating month arrays but didnt work, tried few other options but couldnt manage it. I am trying. this was the last option for me.Also, im not asking people to do it for me, i need samples to analyse it or explanations to understand it. So, please take it easy. if you dont want to help more than u did, thats ok for me. no need to have a stress. regards.
  7. here is my code for displaying per page and max 10 per page. I need it to show monthly inmputs, not 10 input(rows) per page. thanks again. // Number of records to show per page: $display = 10; // Determine how many pages there are... if (isset($_GET['p']) && is_numeric($_GET['p'])) { // Already been determined. $pages = $_GET['p']; } else { // Need to determine. // Count the number of records: $q = "SELECT COUNT(acc_id) FROM hesap"; $r = @mysqli_query ($dbc, $q); $row = @mysqli_fetch_array ($r, MYSQLI_NUM); $records = $row[0]; } // End of p IF. // Determine where in the database to start returning results... if (isset($_GET['s']) && is_numeric($_GET['s'])) { $start = $_GET['s']; } else { $start = 0; } // Make the links to other pages, if necessary. if ($pages > 1) { echo '<br /><a>'; $current_page = ($start/$display) + 1; // If it's not the first page, make a Previous button: if ($current_page != 1) { echo '<a href="acc.php?s=' . ($start - $display) . '&p=' . $pages . '&sort=' . $sort . '">Previous</a> '; } // Make all the numbered pages: for ($i = 1; $i <= $pages; $i++) { if ($i != $current_page) { echo '<a href="acc.php?s=' . (($display * ($i - 1))) . '&p=' . $pages . '&sort=' . $sort . '">' . $i . '</a> '; } else { echo $i . ' '; } } // End of FOR loop. // If it's not the last page, make a Next button: if ($current_page != $pages) { echo '<a href="acc.php?s=' . ($start + $display) . '&p=' . $pages . '&sort=' . $sort . '">Next</a>'; } echo '</a>'; // Close the paragraph. } // End of links section.
  8. Hi, i have created a mysql table for account info which stores basic expenses and income I have also account.php page that shows the all transactions 10 transaction (row) per page. there is no problem with that but I like it to show the transactions(entries) per month base. I mean when i open this page i want it to show this month's entries. and when i click previous button i like to see last month's entries. any help will be appreciated. thanks in advance. regards.
×
×
  • 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.