No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
what do you want to know?
- Interests
- web & software development and Networking
8 Posted Topics
<?php error_reporting(E_ALL ^ E_DEPRECATED); // connection to database include 'database.php'; ?> <?php if (isset($_FILES['image']) && $_FILES['image']['size'] > 0) { //// Temporary file name stored on the server $tmpName = $_FILES['image']['tmp_name']; // // Read the file $fp = fopen($tmpName, 'r'); $data = fread($fp, filesize($tmpName)); $data = addslashes($data); fclose($fp); } $name=$_POST['name']; $email=$_POST['email']; … | |
Re: //loop through your table like this <?php $con = mysqli_connect("localhost","servername","dbn","pwd"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to Database: " . mysqli_connect_error(); } $sql = "SELECT *FROM tbl"; $result = mysqli_query($con, $sql); if (mysqli_num_rows($result) > 0) { // output data of each row while($row = mysqli_fetch_assoc($result)) { … | |
'database connection class file '------------------------------------------------------- Imports Oracle.DataAccess.Client Imports System.Data Public Class DataBaseConnection Private con As New OracleConnection ReadOnly Property connection() As OracleConnection Get Return con End Get End Property Sub New() con.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("DBconnection") con.Open() End Sub Sub closeConnection() con.Close() con.Dispose() End Sub End Class '////////////////////////////////////// 'staff class file '-------------------------------------- … | |
<?php $b=('some data from db') class one{ public $a=$b; } i want to initialize the $a with a variable outside the class, but it is not working. Please how can do this. Thanks in advace ![]() | |
class booking_diary { // Time Related Variables $a="09:30"; $b="19:00"; public $booking_start_time = $a; public $booking_end_time = $b; } I have an input fields where the user will set the $a,and $b fields instead of fixing the dates in the code. Can i do this. Please help. Thank you | |
//exporting to csv file. // this is my code. <?php // Database Connection $host="localhost"; $uname="root"; $pass=""; $database = "db_name"; $connection=mysql_connect($host,$uname,$pass); echo mysql_error(); //or die("Database Connection Failed"); $selectdb=mysql_select_db($database) or die("Database could not be selected"); $result=mysql_select_db($database) or die("database cannot be selected <br>"); // Fetch Record from Database $output = ""; $table = … | |
I have three fields in the database table(**serial_no,arrive_date,written_date**).My problem is if **serial_no and arrive_date** already exist in the database, it show say"data already exist". Though **serial_no and arrive_date** already exist but with a different **written_date**, then the data should be inserted into the database. Example ID Serial_no Arrive_date Written_date 1 … ![]() | |
Hi people, i'm new to php and i have this problem: I am developing an application for an insurance company in php. I have 6 tables linked together by a common id in a database. Applicant or user need so register before loging in.When they login,they fill in a form … ![]() |
The End.