Jump to content

f.ismayil

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Everything posted by f.ismayil

  1. I do not know what is XAMPP or WAMP. Also is PEAR and PECL the same things?
  2. RussellReal as I see you have an experience in installing extensions. I need to install this extension both on local Windows 7 PC and on my hosting. I will put a ticket to hosting admins to install this extension. pecl install <extension name> command I have seen in documentation also. But I do not know where exactly to write it? When I open command prompt and write this command I just receive error message that unrecognised command.
  3. I have never installed packages before. So I do not know the way of doing it. After unpacking archive file I have 1 package.xml file and one folder with lots of files of *.c and *.h extention. What should I do with these files?
  4. I am trying to use "http_post_data" command inside my code. I have downloaded required package from http://pecl.php.net/package/pecl_http link and placed "pecl_http-2.0.0dev1" folder into inetpub of my local webserver. What I do not know is how to install it? All documentations that I read are very complicated and I can not install PECL. Please, help me.
  5. In <head> section of my website I have the following code: <script type='text/javascript' src='stmenu.js'></script> In the body section of my website I have very long code that builds menu. I need to put this code into menu.js and call this file. Code inside <body> is too long so I attached file containing this code. How may I call menu.js file? <script type='text/javascript' src='menu.js'></script> code is not working. [attachment deleted by admin]
  6. Before openning products.php I need to send $_POST variable to it. How to do it? who has ready code?
  7. Should I write something like that? $userid = $_POST['userid']; http_post_data("product.php", $userid); If this code is correct should I call products php before this code or after? I would highly appreciate working code?
  8. I have tilbud.php file that has no output. Just receives data and adds them into MySQL table. Inside tilbud.php file I have JavaScript code that calls products.php. Product.php has the following code: if(!isset($_POST['userid'])) { echo "<script type='text/javascript'>"; echo "window.location = 'index.php'"; echo "</script>"; exit; } So, I you call product.php without submitting $_POST['userid'] it redirects you into index.php. How to submit $_POST['userid'] into products php without using <form method='POST' action='product.php'> ?
  9. I have already found my own mistake. Closing </table> tag is not in correct place :-) echo "<tr>"; if(!mysql_num_rows($result)){ echo "<td valign='top' width='150' height='300' bgcolor='white' cellpadding='0'>"; echo "<img src='note.jpg'>"; }else{ echo "<td valign='top' width='150' height='300' background='tilbud2.jpg' cellpadding='0'> <table border='0' width='150' style='table-layout:fixed' cellspacing='0'> <col width='120'> <col width='30'> <tr><td colspan=2><center><b>Dagens tilbud</b></center><br></td></tr>"; while($row = mysql_fetch_array($result)){ echo "<tr><td>"; $product = $row["Product"]; $price = $row["Price"]; echo "$product"; echo "</td>"; echo "<td>" . "$price" . "</td></tr>"; } echo "</table>"; } echo "</td></tr>
  10. One more note. When remove second <img> tag and write just echo "a"; it also writes letter a in another row. if(!mysql_num_rows($result)){ echo "a"; }
  11. Thanks fugix for reply. I modified code as you said. Still the same thing. One <td> do not fit into <tr> and goes down. I even decreased width and height of picture. It also doesn't help
  12. Looks like HTML problem. But can not put this question in HTML section cause it has PHP code. I have table. I have 3 rows. 1 of rows has rowspan with 2 other rows.Problem is when database is empty program should take one picture and put inside 2 cells of table. First picture sits inside td normally but second picture not fitting into td and gows out of <tr>. Do not know what to do. echo "<tr> <td rowspan='2' width='1000' height='600'> <div id='fadeshow1'></div> </td> <td valign='top' height='300' background='tilbud.jpg'>"; if(!mysql_num_rows($result)){ echo "<img src='note.jpg'>"; }else{ echo "<table border='1' width='120' style='table-layout:fixed' cellspacing='0'> <tr><td colspan='2'><center><b>Ukens tilbud</b></center><br></td></tr>"; while($row = mysql_fetch_array($result)){ echo "<tr><td>"; $product = $row["Product"]; $price = $row["Price"]; echo "$product"; echo "</td>"; echo "<td>" . "$price" . "</td></tr>"; } } echo "</table></td></tr>"; $query = "SELECT Product, Price FROM tilbud WHERE Period='Daglig'"; $result = mysql_query($query,$link_id) or die (mysql_error()); echo "<tr background='tilbud.jpg'> <td valign='top' height='300' width=120 background='tilbud2.jpg'>"; if(!mysql_num_rows($result)){ echo "<img src='note.jpg' width='120'>"; }else{ echo "<table border='1' width='120' style='table-layout:fixed' cellspacing='0'> <col width=110> <tr><td colspan=2><center><b>Dagens tilbud</b></center><br></td></tr>"; while($row = mysql_fetch_array($result)){ echo "<tr><td width='110'>"; $product = $row["Product"]; $price = $row["Price"]; echo "$product"; echo "</td>"; echo "<td>" . "$price" . "</td></tr>"; } echo "</table>"; } echo "</td></tr>
  13. I will have lots of links inside my site. I will have the same banner inside all pages. Is it possible to use Server Side Include for this purpose? Something like that: <!--#include virtual="page.html"-->
  14. Please, take a look to the following code.After clicking Next it goes to overview.php.Why when I click back on my browser to return to this page again, it is not returning back? When I click back I receive "Confirm Form Resubmission" message. After refreshing page it loads page. I guess problem is in "session_start();" part. Something to do with cookies. Please, help me it is very urgent for me. <?php session_start(); echo "<html> <head> <title>Hello World</title> <meta http-equiv='Content-Type' content='text/html; charset=Windows-1252'/> </head>"; require_once ('functions.inc'); if(!isset($_POST['userid'])) { echo "<script type='text/javascript'>"; echo "window.location = 'index.php'"; echo "</script>"; exit; }else{ session_register("userid", "userpassword"); $username = auth_user($_POST['userid'], $_POST['userpassword']); if(!$username) { $PHP_SELF = $_SERVER['PHP_SELF']; session_unregister("userid"); session_unregister("userpassword"); echo "Authentication failed " . "Please, write correct username or password. " . "try again "; echo "<A HREF=\"index.php\">Login</A><BR>"; exit; } } function auth_user($userid, $userpassword){ global $default_dbname, $user_tablename; $user_tablename = 'user'; $link_id = db_connect($default_dbname); mysql_select_db("d12826", $link_id); $query = "SELECT username FROM $user_tablename WHERE username = '$userid' AND password = '$userpassword'"; $result = mysql_query($query) or die(mysql_error()); if(!mysql_num_rows($result)){ return 0; }else{ $query_data = mysql_fetch_row($result); return $query_data[0]; } } echo "hello"; echo "<form method='POST' name='myform' action='overview.php'>"; echo "<input type='submit' value='Next'>"; echo "</form>"; ?>
  15. Sorry I have posted wrong picture. Here is the correct one. Actually I am not going to edit data myself. I am going to make same page and let owner of website to edit table sometimes. Generanlly he will only remove some records and add some. I do not want to give him ability to delete fields. [attachment deleted by admin]
  16. fugix I installed phpMyAdmin, but as I understood it is not what I want. I need component thay I will put into my website. And user who owns website will be able to add some values into database. Something like picture in attachement. [attachment deleted by admin]
  17. fugix from where may I download these components? Are they free and support unicode?
  18. fugix will it give me ability to change database online? I searched a bit in internet and found some components. Most of them are not free. I found one (PHP DataGrid) it was free but when I tried to download it it required registration.So I decided first to ask first. May be it is not so good component. I need freeware component that will support unicode also. Any suggestions?
  19. Hi all, I would like to know which database components are available in PHP? I need a component that will view MySQL table and will give user ability to change data using this component. Which components are recommended? I need this component to support unicode. Cause it will view database that has norwegian letters inside. Thanks for help in advance.
  20. Does anyone knows if FPDF supports Norwegian letters or not? When I write codes of letters it is not showing letter. Are there any command to specify charset? For example in this code is it possible to specify charset? $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','',14); $pdf->Write(5,'F&#248lgende ');
  21. I have such a little code. If I echo $order_date, I receive normal date in YYYY-MM-DD format. But when I use $order_date in mysql query it is not showing me anything. I do not receive any error or warning also. Please help me. $query = "SELECT Product,Amount FROM orders WHERE Date='$order_date'"; $result = mysql_query($query) or die(mysql_error()); while($products_list = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $products_list["Product"] . "</td>"; echo "<td>" . $products_list["Amount"] . "</td>"; echo "</tr>"; }
  22. I will take a look to this web site. Hope it will help me. Thank you very much for advice.
  23. Before posting question here I googled it already. I have found codes of creating pdf files. However how I will create table, I do not know.
  24. I need php code that creates pdf file with table inside.
  25. I forgot to put this code: echo "<form method='POST' name='myform' action='oversikt.php' onsubmit='return checkform(this);'>"; echo "<td><center><input type="submit" value="Neste"></center></td> <td><center><input type="reset" value="Reset"></center></td>"; echo "</form>"; So, when I click Next button I should receive a warning dialog box telling "Please, fill in all required textboxes". Now I do not get any message when I click next. Just loades next php file.
×
×
  • 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.