39,316 Topics

Member Avatar for
Member Avatar for accra

Is there another function for creating php sockets apart from this socket_create(AF_INET, SOCK_STREAM, SOL_TCP); ? Really need to know, thanks.

Member Avatar for accra
0
120
Member Avatar for RikTelner

http://stackoverflow.com/questions/5846/add-1-to-a-field Didn't really work. My script looks as follows: <?php if (isset($_GET["id"]) && isset($_GET["char"])) { $id = $_GET["id"]; $char = $_GET["char"]; $result = mysql_query("SELECT * FROM battles WHERE id='$id'"); if ($char == "1") { $bool = "first_char_votecount"; while($row = mysql_fetch_array($result)) { $mincemeat = 1 + $row["first_char_votecount"]; } } elseif ($char …

Member Avatar for RikTelner
0
281
Member Avatar for sokborey.chea

Hi, why use with table error? if not use witn table are normal... can u help ??? <form method="post" action="page.php"> <table> <tr> <td>Select</td> <td> <select name="people" id="people"> <?php if($_POST['submitted'] == true){ ?> <option value="<?php echo $_POST['people']; ?>" selected="selected"><?php echo $_POST['people']; ?></option> <?php }else{ ?> <option value=""> -- select -- </option> …

Member Avatar for sokborey.chea
0
227
Member Avatar for silent lover

i try to get comment count from a blog post use blog feed. i want to get number inside <slash:comments>0</slash:comments> i use this syntax but did not work: <?php $feed = file_get_contents("http://www.trenologi.com/feed/"); $xml = new SimpleXmlElement($feed); foreach($xml->channel->item as $entry) { $comment = mysql_real_escape_string("$entry->slash:comments"); echo "$comment"; } ?> i think the …

Member Avatar for matrixdevuk
0
433
Member Avatar for Kalaivani Nair

{ ............ ............ $order_details="INSERT INTO ....."; mysql_query($order_details); $o_id_detail[]=mysql_insert_id(); } $prev_id=implode(',',$o_id_detail); $last_id=explode(',',$prev_id); foreach($last_id as $last) { $last; foreach($addon_price as $a_p=>$p) { echo $a_p; foreach($p as $m) { $addon_id= $m['id']; echo $m['addon_name']; echo $m['deposit']; echo $m['ppd']; echo $m['pp_eight']; echo $m['pp_six']; $addon_total = $m['deposit']+$m['ppd']+$m['pp_eight']+$m['pp_six']; echo $addon_total; $addon_detail="INSERT INTO tbl_orderdetail_addon (OrderID,addOns_id,addOns_price) VALUES ('$o_id_detail','$addon_id','$addon_total')"; if(!empty($addon_id)){ …

Member Avatar for matrixdevuk
0
163
Member Avatar for tiredoy

These days, I am busying in building up LAMP environment on CentOS 6.5 While installing phpMyAdmin,problems occur. By convension, I download phpMyAdmin zipped files,and then unzip it to /usr/share/phpMyAdmin. in the folder /etc/httpd/conf.d, I create a new file named phpmyadmin.conf. and add the follow content to it. Alias /phpmyadmin /usr/share/phpMyAdmin …

Member Avatar for matrixdevuk
0
265
Member Avatar for Sikander Nasar

I need Code for Tracking Aramex API.I have found tutorial on their website but i am facing problem to do it. Thanks

Member Avatar for joshl_1995
0
85
Member Avatar for blueguy777

how to convert this old fastioned mysql statements to pdo? <?php error_reporting(0); define("host","localhost"); define("user","root"); define("password",""); define("db","pass2"); $connect_db=mysql_connect(host,user,password) or die("cannot connect"); mysql_select_db(db, $connect_db); $username=strtolower(addslashes($_POST['username'])); $password=strtolower(addslashes($_POST['password'])); $sql="SELECT * FROM users WHERE username='$username' AND password='$password'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $count=mysql_num_rows($result); if($count==1 && $_POST['userlevel'] == "admin") { session_start(); $_SESSION['id']=$row['id']; header("location: admin.php"); } else if($count==1 && $_POST['userlevel'] …

Member Avatar for matrixdevuk
0
2K
Member Avatar for Pravesh_1

Is Paypal Sandbox so changes ? As I am not getting any POST request data on successful payment from Paypal Sandbox in my success page.

Member Avatar for matrixdevuk
0
88
Member Avatar for safi.najjar1

Hello Guys, I coded the following and worked 100% perfectly but I want to do it ajaxly ! how to make all of this sending by ajax with animation(fadeIn,fadeOut) this my code: product.php url: product.php?id=4 <div id="product_page_desc"> <?php foreach ($products as $info) { ?> <div style="background:#fff;box-shadow: 0 0 1px #cd9db1;float: …

Member Avatar for matrixdevuk
0
501
Member Avatar for masterinex

i have a form which asks the user to enter a username , once the user enters the username, the program will check if the username entered by the user is a new username or an old one from the database 'testdb' and table 'test'. if it is a new …

Member Avatar for matrixdevuk
0
238
Member Avatar for malatamil

i have a add to cart website, in that am getting some problem. if i choose available pack size is 100 Grm,quantity-1 and i add to cart this product. again if i choose different product name,pack size is 200 Grm,quantity-2 and add to cart its changed to 200 Grm for …

0
141
Member Avatar for masterinex

basically Im searching for the term ded within subject, how come all i get is Array() when i run this <?php $subject = "dedfd"; $pattern = '/ded/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 2); print_r($matches); ?> and then i tried to search for the letter d within subject and i get Array …

Member Avatar for cereal
0
149
Member Avatar for mc3330418

This i sdriving me nuts and I know there should be an easy answer. Here is the php $sql4 = 'select tranamt, tracct from bd.bdptran where bd.bdptran.trnum = 105 '; $result4 = db2_exec($conn, $sql4); while($row4 = db2_fetch_array($result4)) { echo $row4[0] ."<br />"; echo $row4[1] ."<br />"; } I get the …

Member Avatar for mc3330418
0
167
Member Avatar for veedeoo

Hello everyone, **!WARNING! this function should only be use, WHEN ffmpeg PHP CANNOT be installed in the server.** I just got some free time from tedious and hectic school schedules. About two months ago, I saw a question about "how to get the duration of a given video file?". Of …

Member Avatar for ifile168
2
17K
Member Avatar for mexabet

I have some data in a MySQL table, and I want to use them to populate form fields, so the site's admin can edit them. This is what I have so far in modify.php, but it's not working: <?php // configuration require("../../includes/config.php"); // query users table to retrieve admin homepage's …

Member Avatar for mexabet
0
5K
Member Avatar for Pravesh_1

I am using phpThumb class to generate thumb image and watermark image/text; I am getting thumbnail image successfully but not able to write any watermark text or image. <img src="phpThumb.php?src=<?php echo $row['user_profileid']; ?>/<?php echo $profile['photo_name']; ?>&w=144&h=173&fltr[]=wmi|watermark.png|BL" alt="" class="profile-pic"> I have to change in config file to show watermark ??

Member Avatar for Pravesh_1
0
224
Member Avatar for blueguy777

unable to insert data into table user_detail using jquery i've three files index.php, upload.php, function.php // index.php <?php require_once('function.php'); session_start(); if (!is_user()) { redirect('signin.php'); } $ip = $_SERVER['REMOTE_ADDR']; ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Home</title> <link rel="stylesheet" type="text/css" href="css/pure-min.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <link href="css/uploadfile.css" rel="stylesheet"> <script src="js/jquery.min.js"></script> …

Member Avatar for blueguy777
0
318
Member Avatar for malatamil

after login if i click logout (logout.php) its nor redirecting to login page. its stuck in logout.php page. logout.php <?php session_start(); session_destroy(); if(!$_SESSION['username']){ header("Location: login.php"); } ?> index.php <?php include("config.php"); session_start(); $usern = $_SESSION['username']; //if(!isset($_SESSION['sess_user_id']) || (trim($_SESSION['sess_user_id']) == '')) { if(!$_SESSION['username']){ header("location:login.php"); } ?> <div class="cssmenu"> <ul> <?php if($usern){ ?> …

Member Avatar for malatamil
0
228
Member Avatar for Web_2

I have two radio button that are value 0 and 1 stored in mysql database after that i want to enable(when value is =1) or disable(when value is =0) button. i new to php please give me code for that some thing like that... <input type="submit" ... <?php&nbs p;if (/* …

Member Avatar for Web_2
0
6K
Member Avatar for safi.najjar1

Hello guys I'm wondering how to update rows dynamically for instance: if cart contains one product then update its quantity and if cart contains more than one product update their quantities

Member Avatar for happygeek
-2
146
Member Avatar for berserk

I need help adding new users to a table i have made for an admin that can add or delete users from said table freely. What i have so far is an entry that can add date and time but for some reason it doesnt add the username and password. …

Member Avatar for berserk
0
634
Member Avatar for Priti_P

hello, i have array Array ( [certificate] => Array ( ['name'] => Array ( [1] => 11 [2] => 22 [3] => 33 [5] => 55 [6] => 66 ) ['date'] => Array ( [1] => 1111 [2] => 2222 [3] => 3333 [5] => 5555 [6] => 6666 ) …

Member Avatar for niranga
0
131
Member Avatar for gaurav12
Member Avatar for cereal
0
92
Member Avatar for safi.najjar1

Hello guys I've coded cart class with cart items and showed cart items in a table but I had a problem when I try to update the cart.. It updates all the cart items when I'm changing quantity in one of the items **HTML** <div class="cartContainer"> <h1 class="shoppingBag">your shopping bag</h1> …

Member Avatar for safi.najjar1
0
416
Member Avatar for ilovephp798

is it possible to make INSERT all checkbox values into database when there is **not even one** checkbox being checked since im using **array_diff** as shown below? my problem currently facing is, when there is a checkbox being checked, it will insert into checked_table and the remainder options which did …

Member Avatar for ilovephp798
0
1K
Member Avatar for RonKevinT.Manuela

SO i WAS TESTING my code..and it doesnt seem to work...here it is <?php require_once('../includes/config.php'); if ($_Session['roleID']=1) { echo "admin"; } elseif ($_Session['roleID']=2) { echo "faculty"; } ?>

Member Avatar for RonKevinT.Manuela
0
808
Member Avatar for RonKevinT.Manuela

hello masters, I have a problem regarding limiting the pages a certain user can access..in my case, i have added a roleID to my members table... here is the original code first <h1>Welcome SICS Admin!</h1> <ul id='adminmenu'> <li><a href='index.php'>Modify News Archive</a></li> <li><a href='categories.php'>Categories</a></li> <li><a href='users.php'>Faculty</a></li> <li><a href="../" target="_blank">Department Website</a></li> <li><a …

Member Avatar for ehpratah
0
224
Member Avatar for mwnt2014

Want to count ads clicks and Impressions using wordpress plugin. how to do this .. send me the links regarding this.. Clicks and impressions have to store in other domain database.

0
115
Member Avatar for James singizi

**i have some code to redirect a user to a page if their login details are correct. part of the code is as below but it never redirects to the specified page. help me sort this out** if($pass==$dbpass){ //safely redirect user to the home page and start a new session …

Member Avatar for jresponse
0
226

The End.