Jump to content

Search the Community

Showing results for tags 'PHP'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 917 results

  1. Hi all, I have just started learning PHP. I hit into this wall currently where I have a page(main.php) which stores the session value 'name' of the login personnel.On login to main.php, some sql scripts will run and username and some values will be shown on the page. The page also allows user to input some values and on submit, the value will be send to confirm.php to validate. So on confirm.php, I have this small code if ($tday < $day){ if($tmth <= $mth){ echo "Please select a valid Date!!"; header("Refresh: 3; url=http://localhost/main.php");} else{ $tempDay = cal_days_in_month(0,$mth,$yr); $tempTotal = $tday + ($tempDay-$day); $calDays = $tempTotal + 1; echo "Total Number of Days Taken is ".$calDays; } } This line header("Refresh: 3; url=http://localhost/main.php"); will redirect back to the previous page automatically after 3 seconds.but I find that the session value 'name' is not loaded. anyway i can change it to reload the whole main.php? TIABai
  2. bigjoe11a

    Uploading Files

    When I try and upload a file. That values come back as empty. Any one have any ideas why this is happening. $newfile = $_FILES['file']['tmp_name']; echo 'File Name '. $newfile; // this returns an empty string. Joe
  3. gdust26

    Php Solution Similar To Iframe

    I am brand new to PHP and I've started my first php website! I am really excited and things have been going smoothly as of now. The problem that I am having is I want to create a portfolio page that will be easy to update and add to in the future. I've looked around and found information about iFrames, but I've heard they're not the best practice or a great solution. I want to do it all in PHP if possible, but I guess the idea would be similar to iFrames - when the link is clicked in the left navigation, then it will load that php include on the right. Here's what what's on my portfolio page:- I have a left sidebar navigation (portfolioNav.php).- I have the project file on the right side as an include as well.- I have all the includes (header.php, footer.php, portfolioNav.php, etc) in the main page called portfolio.php. My site:http://ginadust.com/test/portfolio.php Is there a way to link to the different php files in one <a href>? What is the solution? I would really appreciate any help on this, I seem to be at a loss. Thanks in advance!
  4. absorr

    Submitting To Submit

    I want to make it so that when you hit the submit button, the text in the text box is added onto a separate html document. Don't explain how, just give me a code example and some basics on it.
  5. samerhannoun

    Php Java Bridge

    Hi guys,,, I am into something strange and I haven't any idea about how to implement this ###### (PHP Java Bridge). I make some research and then go back here to ask some question if you can help guys! What I would like to know the following: 1. What is the System requirement for that? (Windows and Linux). and small examples test on windows and Linux FinallyThanks in advance for any help Best wishes
  6. assassin87

    Php Search

    Hi everyone, i have created a project in php, its a phonebook. for example i have two name as alex, when i search it brings me just one alex. How can i bring that second alex. Can you check my codes pls. <?php error_reporting("0"); require_once('Connections/baglanti.php'); ?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = ""){ if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue;}}$currentPage = $_SERVER["PHP_SELF"];$maxRows_arama = 10;$pageNum_arama = 0;if (isset($_GET['pageNum_arama'])) { $pageNum_arama = $_GET['pageNum_arama'];}$startRow_arama = $pageNum_arama * $maxRows_arama;$colname_arama = "-1";if (isset($_GET['kelime'])) { $colname_arama = $_GET['kelime'];}mysql_select_db($database_baglanti, $baglanti);$query_arama = sprintf("SELECT * FROM rehber WHERE adi LIKE %s " , GetSQLValueString("%" . $colname_arama . "%", "text"));$query_limit_arama = sprintf("%s LIMIT %d, %d", $query_arama, $startRow_arama, $maxRows_arama);$arama = mysql_query($query_limit_arama, $baglanti) or die(mysql_error());$row_arama = mysql_fetch_assoc($arama);if (isset($_GET['totalRows_arama'])) { $totalRows_arama = $_GET['totalRows_arama'];} else { $all_arama = mysql_query($query_arama); $totalRows_arama = mysql_num_rows($all_arama);}$totalPages_arama = ceil($totalRows_arama/$maxRows_arama)-1;$queryString_arama = "";if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_arama") == false && stristr($param, "totalRows_arama") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_arama = "&" . htmlentities(implode("&", $newParams)); }}$queryString_arama = sprintf("&totalRows_arama=%d%s", $totalRows_arama, $queryString_arama);mysql_free_result($arama);?><form id="form3" name="form3" method="post" action="index.php"> <input type="submit" name="ANASAYFA" id="ANASAYFA" value="ANASAYFA" /></form><p> </p><table border="1" align="center"> <tr> <td>id</td> <td>adi</td> <td>soyadi</td> <td>gsm</td> <td>ev</td> <td>web</td> <td>mail</td> </tr> <?php do { ?> <tr> <td><a href="ayrinti.php?recordID=<?php echo $row_arama['id']; ?>"> <?php echo $row_arama['id']; ?> </a></td> <td><?php echo $row_arama['adi']; ?> </td> <td><?php echo $row_arama['soyadi']; ?> </td> <td><?php echo $row_arama['gsm']; ?> </td> <td><?php echo $row_arama['ev']; ?> </td> <td><?php echo $row_arama['web']; ?> </td> <td><?php echo $row_arama['mail']; ?> </td> </tr> <?php } while ($row_arama = mysql_fetch_assoc($arama)); ?> <?php do { ?> <?php } while ($row_arama = mysql_fetch_assoc($arama)); ?> <?php do { ?> <tr> <td><a href="ayrinti.php?recordID=<?php echo $row_arama['id']; ?>"> <?php echo $row_arama['id']; ?> </a></td> <td><?php echo $row_arama['adi']; ?> </td> <td><?php echo $row_arama['soyadi']; ?> </td> <td><?php echo $row_arama['gsm']; ?> </td> <td><?php echo $row_arama['ev']; ?> </td> <td><?php echo $row_arama['web']; ?> </td> <td><?php echo $row_arama['mail']; ?> </td> </tr> <?php } while ($row_arama = mysql_fetch_assoc($arama)); ?> <?php do { ?> <?php } while ($row_arama = mysql_fetch_assoc($arama)); ?> </table><br><table border="0"> <tr> <td><?php if ($pageNum_arama > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_arama=%d%s", $currentPage, 0, $queryString_arama); ?>">İlk</a> <?php } // Show if not first page ?></td> <td><?php if ($pageNum_arama > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_arama=%d%s", $currentPage, max(0, $pageNum_arama - 1), $queryString_arama); ?>">Önceki</a> <?php } // Show if not first page ?></td> <td><?php if ($pageNum_arama < $totalPages_arama) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_arama=%d%s", $currentPage, min($totalPages_arama, $pageNum_arama + 1), $queryString_arama); ?>">Sonraki</a> <?php } // Show if not last page ?></td> <td><?php if ($pageNum_arama < $totalPages_arama) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_arama=%d%s", $currentPage, $totalPages_arama, $queryString_arama); ?>">Son</a> <?php } // Show if not last page ?></td> </tr></table><p>Kayıtlar <?php echo ($startRow_arama + 1) ?> hedef: <?php echo min($startRow_arama + $maxRows_arama, $totalRows_arama) ?> / <?php echo $totalRows_arama ?></p><p> </p><form id="form1" name="form1" method="post" action="index.php"> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <p> <input type="submit" name="GERİ" id="GERİ" value="GERİ" /> </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote></form><p> </p>
  7. hello there w3teachers and friends. I have some question. I believe that I actually have wrote like a several tens of thousand line of script. But, just a few weeks ago, I met some script that changed a bit of my belief. Well, simply let me make turn the question into some example: case 1: <?phpif($foo == "foo"){echo "<span>some statement is running</span>";}?> case 2:<?phpif($foo != "foo"){?><span>theres no running statement</span><?php}?> okay, the example script that has changed my belief is the second case. So, my question is:1. which example do you thing is good for practice 2. I can see that sometimes, the second case is easier, but sometimes may burden since I need to write <?php echo ;?> to instill some php in it. Thanks a lot and give a comment!!
  8. I want to integrate gtalk in my website just like way2sms.com.If anybody seen api then share a link...
  9. Hi, I have WAMP installed as well as IIS. IIS is on port 80, Apache runs on port 8888 via WAMP I want to be able to hit: http://www-mydomain-co-uk:8888 and for it to bring up: http://localhost :8888/mydomain/index.php So far I have taken these steps: httpd.conf: <VirtualHost *:8888>DocumentRoot /www/mydomainServerName www-mydomain-co-uk# Other directives here</VirtualHost> and hosts file: 127.0.0.1 www-mydomain-co-uk When I hit http://www-mydomain-co-uk:8888 I get: Forbidden You don't have permission to access / on this server. So I'm on the right lines but what the ###### is up?
  10. houssam_ballout

    Upload Word Document

    Hello,I had created a form for users to upload their resumes (only word documents & 1 MB allowed as size), then email it after its been successfully uploaded.Any help?Thanks in advance
  11. Hi community,I want to write a script which performs the following action,1) I want a module which displays a search box where user can enter a zip code2) After hitting search button the code which search the pincode in a csv file which i have in my server and return the fields which that pincode associate to be.3) Display that returned result in that module.In detail, the core project is whether we are able to deliver the package in certain area[pincode]. So the user before purchase anything from us must want to check we are delivering that area. The .csv file looks like, it has 4 fields, pincode, delivery status, approx time of delivery. So the script wants to read the pincode and return the other fields. hope i explained clearly. Sorry for my bad english.Cheers from Selvamani
  12. houssam_ballout

    Export Dynamic Data To Pdf With Php

    Hello,I had page that display results dynamically from the database, I need to export that html table to pdf.Any help?Thanks
  13. rmarsh9374

    Php Ipn Listener For Paypal

    I am new to PHP and really enjoying learning it. I am stuck on a key part of my project for my small company. I am trying to learn how the IPN Listener for Paypal works. They provided an example in PHP. So I figured i'd modify it to send me an email when a person does a "normal" purchase. After I got that working I'd take that and work it into the project. I got a responce from the IPN Listnener when I had a typo in the url to send info back to Paypal for varification, but once I fixed that I have got nothing. I am sure I am making a lot of Noobie mistakes in it, please help me learn. I've been looking at it so long I am lost as how to fix it. Ryan (The project will in the end take the verified message from Paypal and pull information from the db and put in a file and email it to the client.) below is my code: <?php$dvd_purchase = TRUE;//variables to compaire against IPN information$dvd_cost = 149.00;$test_custom = 25;$boss_email = 'boss@mycompany.com';//Showme the errorsini_set ('display_error', 1);error_reporting (E_ALL | E_STRICT);// read the post from paypal systemand add 'cmd'$req = 'cmd=_notify-validate';foreach ($_POST as $key => $value) { $value = urlencode (stripslashes ($value)); $req .= "&$key=$value";}//postback to Paypal system to validate$header = '';$header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";$header .= "Content-Type: application/x-www-form-urlencoded\r\n";$header .= "Content-Length: " . strlen($req) . "r\n\r\n";//$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);$fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);//assign posted variables to local variablesif (isset($_POST['item_name'])){$item_name = $_POST['item_name'];}if (isset($_POST['item_number'])){$item_number = $_POST['item_number'];}if (isset($_POST['payment_status'])){$payment_status = $_POST['payment_status'];}if (isset($_POST['mc_gross'])){$payment_amount = $_POST['mc_gross'];}if (isset($_POST['txn_id'])){$txn_id = $_POST['txn_id'];}if (isset($_POST['receiver_email'])){$receiver_email = $_POST['receiver_email'];}if (isset($_POST['payer_email'])){$payer_email = $_POST['payer_email'];}if (isset($_POST['custom'])){$custom = $_POST['custom'];}if (!$fp) { // HTTP ERROR $to= myemail@mycompany.com; $subject= "DVD Order Could Not Connect to PayPal!"; $message= "PayPal connection failed ". "\r\n" . $from = "IPN"; $headers = "From: $from" . "\r\n"; mail($to,$subject,$message,$headers);} else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") ==0) { if ($payment_amount != $dvd_cost){ $dvd_purchase = FALSE; } if ($custom != $test_custom){ $dvd_purchase = FALSE; } if ($receiver_email != $boss_email){ $dvd_purchase = FALSE; } if ($dvd_purchase = TRUE){ //Email me it is ok. $to= myemail@mycompany.com; $subject= "DVD Order Good to Go!"; $message= "DVD ORDER: "."$payer_email". "\r\n" . "Iten Name: " ."$item_name". "\r\n" . "Iten Number: " ."$item_number". "\r\n" . "Payment status: " ."$payment_status". "\r\n" . "Payment Amount: " ."$payment_amount". "\r\n" . "Transaction ID: " ."$txn_id". "\r\n" . "receiver_email: " ."$receiver_email". "\r\n" . "payer_email: " . "$payer_email" . "\r\n"; $from = "$payer_email"; $headers = "From: $from" . "\r\n"; mail($to,$subject,$message,$headers); } if ($dvd_purchase = FALSE){ $to= myemail@mycompany.com; $message = "Somthing is off:"."$payment_amount". "\r\n". "$custom"."\r\n". "$receiver_email"."\r\n"; $from = "IPN"; $headers = "From: $from" . "\r\n"; mail($to,$subject,$message,$headers); } } else if (strcmp ($res, "INVALID") ==0) { //log for manual investigation $to= "myemail@mycompany.com"; $subject= "DVD Order IPN Verification Failed!"; $message= "DVD ORDER: "."$payer_email". "\r\n" . "Iten Name: " ."$item_name". "\r\n" . "Iten Number: " ."$item_number". "\r\n" . "Payment status: " ."$payment_status". "\r\n" . "Payment Amount: " ."$payment_amount". "\r\n" . "Transaction ID: " ."$txn_id". "\r\n" . "receiver_email: " ."$receiver_email". "\r\n" . "payer_email: " . "$payer_email" . "\r\n"; $from = "$payer_email"; $headers = "From: $from" . "\r\n"; mail($to,$subject,$message,$headers); } } fclose ($fp);}?>
  14. attila2452

    Flickr Sets.

    How do i use flicker sets on my portfolio under portfolio.like this : http://jontangerine.com/about/aside/ how do i do that with my portfolio but able to style it to this: http://attilahajzer....?page=portfolio when i click the picture it opens in a new tab. i know how to link like target="_Blank" and all. just how do i set up the api and style it how i want? i would like to use my Web Design Set as my portfolio.
  15. Howdy_McGee

    Advanced Php Tutorial

    I know the basics of PHP and MYSQL but I can't seem to get down putting it all together in order to make an admin panel / website backend. I was wondering if anyone knew of any specific tutorials that covered creating admin panels / website backends so I could get a feel of what I'm doing right and what I'm doing wrong.
  16. Hi i'm a newbie in this forum i like W3S is the best page ever for learning and be a web developer and i need help... how do i know if a filed is empty on php & mysql block code and make a redirection on the same page or other files for example... if we have a form called and have this code <html><body><form action="insert.php" method="post">Firstname: <input type="text" name="firstname" />Lastname: <input type="text" name="lastname" />Age: <input type="text" name="age" /><input type="submit" /></form></body></html> and then we have this file call it <?php$con = mysql_connect("localhost","peter","abc123");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("my_db", $con);$sql="INSERT INTO Persons (FirstName, LastName, Age)VALUES('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";mysql_close($con)?> and if a have fristname as a UNIQUE field in mysql... how do i know if a field is empty and make a redirection to a pages or file? (that includes same files on your root folder) i hope that you help me thx
  17. justsomeguy

    PHP Tips and Tutorials

    Please send me a PM with any comments, corrections, additions, or requests. Please do not reply to this topic. Replies will be deleted to avoid clutter.Official PHP site: http://www.php.net/PHP Installation Packages: http://www.php.net/downloads.phpPHP Installation Instructions: http://www.php.net/manual/en/install.general.phpPHP Online Manual: http://www.php.net/manual/note: links given to the manual are in English, but the manual can be read in several languagesPlease send me a PM to request specific topics.
×