Jump to content

Search the Community

Showing results for tags 'PHP'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. I want to count user who open the page , I want to insert in mysql table when user open the page and I want to insert or upadet when close the page by click [x] or press alt+F4 but not onunload or onbeforeunload , cause this also call when refresh I want to call this alert when close onlyI can use a code which insert when open and not insert when refresh , but I couldnt solve insert or update when close the pagehere is my code: <?session_start();if (!isset($_SESSION["visits"])) $_SESSION["visits"] = 0;if ($_SESSION["visits"] > 0){echo 'visit='.$_SESSION["visits"];echo "You hit the re
  2. Are they the same or are they different?
  3. ok... i tried to enter my localhost again today to edit a little more on my projects... then i get this error: (PICTURE ATTACHED...) What the heck is that?... i mean... this is the line its talking about: (?>) witch are my PHP ending tag... someone?... Attached my config file also...
  4. I got this textarea it works when i paste chars asdsakopöosatfsjoqtqpw but it gives error on result when there is öäå Error result Incorrect string value: '\xE4as\xF6da...' for column 'Teksti' at row 1
  5. I have this php script stop.php <?phpinclude('ssh_con.php');$stop = 'screen -S testapplication -X quit';ssh2_exec($con, $stop);mysql_query("UPDATE servers SET Online=0 WHERE Owner='".$_SESSION['Username']."'");echo "<meta http-equiv='refresh' content='0;index.php'>";?> now i want to execute/call/get this page/script using javascript onclick to execute the code and the page refreshes itself. Can anyone guide me to do this? Thanks before hand.
  6. Mudsaf

    mail() questions

    Im wondering how does this mail() function work. I got PHP script likewhile ($row = mysql_fetch_array($result2)) {mail($row['Sahkoposti'], 'New comment on websites', '$text');} 1. $row['Sahkoposti'] = Email2. 'Subject'3. text Im wondering does this email thing require SMTP service or some port open to work correctly.
  7. Okay this is part of my file upload script what has been taken from tizag websites. Somehow this is giving me the error and $target_path = ../Materials/ if (isset($_GET['submit'])) {$target_path = $_GET['directory'];$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "File ". basename( $_FILES['uploadedfile']['name']). " has been sussefully added to websites.";} else { echo "There was error during upload, please check that filesize is not higer than 8MB.";echo $target_path;}}
  8. Hello everybody Im wondering how can you make page that displays every .jpg, .gif & .pdf files from directories on website table. Im not sure what coding language i have to use, but i think its mostly html. PHP & javascript code will be accepted too. Found solution after some research: http://www.brightcherry.co.uk/scribbles/php-list-all-files-in-a-directory/
  9. hey everyone :)I want make a tab use funtion java script , so every menu tap have form for input datamy problemo , when I doing input data the tab go to proses file inputI want when do input , stay at menu tab and dont move to file proces how for do it thjs befroe
  10. hey eryone I want do edit a menu select , ex: a menu selct Date , how to display data from db in the menu select it , Can help me Thask befpre
  11. Mudsaf

    [PHP Wiki]

    Okay, my problem is that i want text to appear at "table of contents" place on PHPWiki, but the text size should be normal size. At the moment i can only make "Headers 1 & 2" that appears in table of contents spot on "my" websites.
  12. Hello W3S... im having this error: (LOOK AT ATTACHED PICTURE...) and here is my shop.php code: include ("shop_undermenu.php");$catID = $_GET['cat_id'];if(!isset($catID)){$result = mysql_query ('SELECT * FROM `shop_cat` ORDER BY shop_cat_id ASC LIMIT 1');$row = mysql_fetch_assoc ($result);$catID = $row['shop_cat_id'];}$query = "SELECT * FROM shop_items WHERE FK_catID = ".$catID;$result = mysql_query($query); if(mysql_num_rows($result)>0){echo "<form action='' method='post'>";echo "<table class='shop_table_100'>";echo "<tr class='shop_tr_holder_css'>";echo "<td>Add&l
  13. Hi all I have a MS Server 2008R2 set up with IIS7 In IIS I have set up an SMTP (with the IIS6 requirements) and the standard PHP that you get with it all. The SMTP server works. Reason we have to use a local SMTP server to interface with our actual mail server is because the external server requires TLS authentication and many smaller office scanning machines don't support it. I am able to send mail through the SMTP without issue, both from an office MFP and from a mail client like Outlook 2010. The PHP works too. I have it displaying PHP webpages and even going as far as accessing ODBC data r
  14. Mudsaf

    Problem with PHP

    Im selecting data from my database, but i want the image to be smaller in one place and higer in other place. So i got like mainpage what selects 1 from latest news & mainpage doesn't have that much space at "Width" as the image or video would require, but is it possible to make the "img/video" smaller before i get it from database. Example i want the code at mainpage to have like 200 width150 height News page should show the video as it has been posted to MySQL. Example here 600 width (The amount set when inserting the post)400 heigh (The amount set when inserting the post) This might
  15. I wonder whether someone may be able to help me please. This script below is called upon a button click from one of my HTML pages and it's purpose is to delete images stored on my server and the associated child node from a XML file. <?phpif (!empty($_POST)) { $image = $_POST['image']; if (file_exists($image)) { unlink($image); } $doc = new DOMDocument; $doc->load('UploadedFiles/' . '1' . '/' . '1' . '/' . 'files.xml'); // iterate over all tags named <file> $list = $doc->getElementsByTagName('file'); foreach ($list as $domElement) { // check whether attribute 'source' e
  16. I am developing the file locally with LAMPP and my source file is like this: <?php echo "The server is working"; ?><?php$file=fopen("file.txt", "r") or exit("Unable to open file!");?> In the same directory is a text file named file.txt and it has a line on text in it. The output however is only The server is working. Nothing else.
  17. Can you please provide Cake PHP tutorial in this website? Tutorials of this website are so simple that I want to have every tutorial related to PHP on this website only.
  18. I have some data in a flat file. These are the fields: nameaddressziplatlng A row of data might look something like: fishing hole #1, Catalina Island U.S., 90704, 33.3, 118.4 There are fifty rows of data. I am trying with PHP to encode this data into an XML file. The ultimate goal is that the data will be stored on the disk in XML format and when requested PHP will read the XML file and retrieve the data and put it into an array so I can encode the data in JSON and send it back off to JavaScript (AJAX). I'm very familiar with working with flat files and SQL however XML is a bit unfami
  19. At the top of my page, I have: <?php//connect to dbinclude "MyConnect.php";// $artist = $_GET['Mia'];?> Inside the "MyConnect" is: //get all of the photos$photoList = "";$artist = $_POST['artist'];$sql = mysql_query("SELECT * FROM $artist ORDER BY photoID DESC LIMIT 6");//check for photos$photoCount = mysql_num_rows($sql); if ($photoCount > 0){ while($row = mysql_fetch_array($sql)){ $photoID = $row["photoID"]; $photoName = $row["photoName"]; $photoList .= '<li class="thumb"> <a href="#"><img src="../images/mia/' . $photoName . '.jpg" alt="' . $photoName
  20. hey friends, I have a problem with this, what happpenned with its Notice: Undefined index:, I use XAMP 17.7 , berfore I use XAMP1.7.1 the notice never appear , wht is wrong pls , help me thks mastah ..
  21. damju87

    PHP Loops

    How do I set this kind of loop? First, it fills the cell with the data from the database. <table border="1"><tr><td>Row 1, cell 1</td></tr></table> Then, if there is more data added into the database. <table border="1"><tr><td>Row 1, cell 1</td><td>Row 1, cell 2</td></tr></table> Here's where I want the loop to start. I want it to repeat the process when the row has two cells by creating a new row.
  22. Good day, I am quite new to web design with only 3 weeks experience and I ran into a problem that totally elude me. I am currently working on my website and I am stuck with my "Send" button. I can't apply the style from my CSS to my php button, it is supposed to be on the right side and look like the clear button, instead I get a plain rectangle box on the left side. [/left] The first part of the following code is to make a clear button. Here is the html part of the code:[/left] [/size][/color][/font][/left]<div class="alignright"><a href="#" class="link4" onClick="doc
  23. I've kind taught myself PHP whilst looking online for examples. I use classes, I just wonder if I'm setting up my classes the right way. Do you have to explicity give a class access to another class in the way I've done below?: $db = new dbConnectionMSSQL();$systemLog = new systemLog();$clubTickets = new clubTickets();$Customers = new Customers();$Events = new Events();$TicketOrders = new TicketOrders();$PlacesOfInterest = new PlacesOfInterest();$Tonight = new Tonight(); $clubTickets->db = $db;$clubTickets->Customers = $Customers;$clubTickets->Events = $Events;$clubTickets->Places
  24. hello,I need help in my academic project. I need to transfer some data from one php script on one machine to that on another. I am using curl for that. I can use CURLOPT_POSTFIELDS for that but it does not transfer the control to second script. I want to use CURLOPT_FOLLOWLOCATION but how to use it i dont know. So please help me out with some code.this is what i tried.curl.php
  25. I'm trying to save a lot of time instead of editing the page everytime. Wouldn't it be easier to just change the information in the database, right? I've been searching for days on how to do it but having no luck. I will be very grateful for the help. Thank you. <table id="data"> <tr> <th scope="row">Occupation</th> <td>Singer</td> </tr> <tr> <th scope="row">Debut</th> <td>December 02, 2011</td> </tr> <tr> <th scope="row">Data of Birth</th> <td>February 13, 1990</td> </tr>
  • Create New...