Jump to content

Search the Community

Showing results for tags 'mysql'.



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 279 results

  1. 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>
  2. Hello,I had page that display results dynamically from the database, I need to export that html table to pdf.Any help?Thanks
  3. 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.
  4. 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
×
×
  • Create New...