39,323 Topics

Member Avatar for
Member Avatar for calebcook

Hi. I need a function which will convert a decimal to a fraction, so that I can put in [CODE]echo dec2frac(1.75);[/CODE] and it'll output 1 3/4. Any suggestions? Thanks

Member Avatar for diafol
0
3K
Member Avatar for davy_yg

I wrote the following codes: [CODE] <?php $nama = ('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit') sort $nama reset($nama) $i=1; do { $i++; echo "The key is " . $i . "and the value is “ .$i <br />"; } while ($i<=5); …

Member Avatar for pritaeas
0
84
Member Avatar for Virangya

hi.. i'm going to host my project and on clients site, a user always have to login to view what he can view. So the user has a user name and a password. Is there a way i can enable a user to login automatically without just entering user name …

Member Avatar for Virangya
0
208
Member Avatar for rakwel10

How can I make my website work like this: User forgot to logout its account to PC1. Then he goes to PC2 and login the same account he uses to PC1. User successfully logs in to PC2 while its account in PC1 is autamatically logged out. How is that?

Member Avatar for rakwel10
0
241
Member Avatar for harsha.netpem

hello, I need the coding of only selected users allow the certain pages and they don't have a permission in admin section in php. Please reply ASAP.

Member Avatar for vidjin
-1
133
Member Avatar for vidjin

Hi, Is there any possibility to use Coda in windows for PHP Developement ?!?!?!? I have seen CODA on a Friend's Macbook Pro and it is wonderful and have great features. Anyway to use it on Windows? Thanks

0
103
Member Avatar for ericwalter

Hi, I need some help in editing the theme ''allure real estates theme''. I got stranded when adding a new country to the 4 countries listed. I managed to add a country at (/home/dbname/public_html/wp-content/plugins/placester/core/const.php) but when I try add a listing, the reply in the country field is that the …

0
58
Member Avatar for countycowpoke

I am trying to send registration/ activation information via email, but don't want to store my authentication within the vb.net app and therefore not wanting to use .NET SMTP. I have the below php script that works from a website, but I can't seem to get the variables sent to …

Member Avatar for countycowpoke
0
393
Member Avatar for khushhappy

Hi, I am stuck with a problem being un-solved. Basically i want a solution in which when a User signup , he to be asked a secret Code which is only known by the [B]CS WING staff[/B]. If the user signup as other then CS WING staff section member (options …

Member Avatar for chrishea
0
96
Member Avatar for davy_yg

[CODE] $nama = array('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit'); //sort ($nama); //reset($nama); $i=1; do { echo "The key is " .$i. " and the value is " .$nama[$i]; $i++; } while ($i<=5); Echo "newline"; ?> [/CODE] The following error appears: Notice: …

Member Avatar for diafol
0
617
Member Avatar for komanche

I have written a login page but each time I login it returns a blank page even with a wrong password please help: the login page is as follows: [CODE] </head> <body> <div id="wrapper"> <form action="methods/login.php" method="post"> <ul> <li><label>Username:</label><input type="text" name="username" size="10" value="<?php echo htmlentities("$username"); ?>" /></li> <li><label>Password:</label><input type="password" name="password" …

Member Avatar for karthik_ppts
0
786
Member Avatar for kiwimedia

[B]Sending email through PHP[/B] [B]Intro[/B] Thousands of websites use contact forms to communicate with their users. You will have almost certainly seen one if not used one to contact someone. The contact form will take the users information that he or she has filled in then send the data over …

Member Avatar for KingGold171
1
3K
Member Avatar for dw_user

$split = preg_split('/[\s]+/',$datarow); What does '/[\s]+/' mean? [\s] represents any whitespace character, '+' represents the whitespace character should be followed by something. But what do the two '' mean?

Member Avatar for diafol
0
47
Member Avatar for fabzster

Hi I have a script that is scheduled to run with task scheduler will download a file via FTP and import it to a mysql DB How would I go about handling the retries if there is either a problem with the connection or something. I tried going about it …

Member Avatar for fabzster
0
659
Member Avatar for krabz01
Member Avatar for skylove

please help me. this my trouble Notice: Undefined index: p in C:\wamp\www\index.php on line 7 and soure [CODE]<?php session_start (); include ("function.php"); $title = "Trang chủ"; include ("header.php"); $p_now = intval($_GET ['p']); $total = mysql_result ( mysql_query ( "SELECT COUNT(id) FROM baiviet WHERE kieu='post'" ), 0 ); $numofpages = $total …

Member Avatar for karthik_ppts
0
87
Member Avatar for Dante2

Ok, working on a blog engine. Small and somewhat unimpressive, basically following along with a tutorial. The tutorial basically has me write a little MySQL to query some test fields that we filled in manually. And here is what I get. (see attachments) The first one shows the read out …

Member Avatar for Dante2
0
307
Member Avatar for maimihits

hello i wanted to display the nultiple image in the webpage from mysql database. I am new to php. till now it only displays one image at a time. Please help . Here is the code snippet: [CODE]<?php $db = mysqli_connect ('localhost', 'username', 'pwd', 'databasename'); $query = "select * from …

Member Avatar for diafol
0
357
Member Avatar for xshmrz

[CODE]<?php $datax = $db->get_results("SELECT katid, katparentid, katadi, katsira, katdurum FROM sql_kategori WHERE katparentid='0'");?> <form action="index.php?menu=com.kategori:ekle.kod" method="post" name="formx" id="formx"> <table id="tablexcaption" width="600" border="0" cellspacing="2" cellpadding="2"> <tr id="caption"> <td width="40" align="center" valign="middle">Id</td> <td width="40" align="center" valign="middle">P.Id</td> <td>Kategori Adı</td> <td width="40" align="center" valign="middle">Durum</td> <td width="40" align="center" valign="middle">Sıra</td> <td width="40" align="center" valign="middle">Düzenle</td> <td width="40" …

Member Avatar for diafol
0
104
Member Avatar for chand8

Hi, I have two servers. The question is i want to select the information form one server's table and insert it into other server's table. for that how many files i need. I am able to select table data form server one but i don't know how to insert it …

Member Avatar for diafol
0
206
Member Avatar for bala2111

I want to display last 6 months from the current month. For example This month is september, I want to display April, May, June, July, August, September Can anyone help me with this ?

Member Avatar for diafol
0
3K
Member Avatar for Shizuo

How can I output the resulting echo from my php to the main html? heres my code: what I want is when the I submit , the resulting echo will be posted in the <p id="alert" name="alert"></p> of the main html HTML: [code] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>REGISTER</title> <link rel="stylesheet" type="text/css" …

0
75
Member Avatar for mary_forum

hi friends how to send post value in url code is: header('Location:edit_products.php?catid=$_POST[catidHd]&catname=$_POST[catnameHd]'); the $_POST[catidHd] value coudnt taken how to give this $_POST[catidHd] in url tnx

Member Avatar for ddymacek
0
1K
Member Avatar for tawboiid

This question is in regards to the little dynamic image that you can link to in your Daniweb profile (see profile page, bottom right). I was curious how Daniweb is set up to dynamically create these images. I would like to do something similar on my site. Could Dani share …

Member Avatar for tawboiid
0
132
Member Avatar for davy_yg

Hi, What's the code to print out all letters that is consonants (exclude all vowels)? [CODE] $name = James Cool Yang; i=1; do { echo parse_str($name) } while(i<strlen($name)) [/CODE] The following error occurs: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\php_exercise\exercise4.php on line 4

Member Avatar for cereal
0
73
Member Avatar for raghu.ndu

Hi, I have this PHP code to send mail with attachment... when I send mail without attachment I am getting the message but when I attach something I am getting the attachment but the message body is blank... please help!! Below is the PHP code : [CODE] <?php // Your …

0
108
Member Avatar for mary_forum

hi frns how to remove & and space from a string.i just gn in url. wn i get this name using request only the door comes rest will be cut.how to remove & and space prod.php?name=Door%20&%20Window%20Hardware tnx

Member Avatar for diafol
0
259
Member Avatar for akasekaihime

can I ask a question? how can I accept inputs in PHP...... here is the code..... [CODE]<html> <body> <h4>Grade Form</h4> <form action="testingform.php" method="post"/> Grade: <input name="Grade" type="text" /> </form> <?php if ($grade>="75") { echo "PASSED"; } else($grade<="75") { echo " FAILED"; } ?> </body> </html> [/CODE] [B]the condition is if …

Member Avatar for divyakrishnan
0
105
Member Avatar for alltech

i have website and the XML from another site gives booking info within the CDATA and i want to extract the content of this CDATA using PHP and also create a button so when this is clicked this CDAT content is retrieved. Please help

Member Avatar for alltech
0
389
Member Avatar for Buppy

Hi, I have a MySQL database and an array with ID's. For example: $q = array(4,7,9,34,12,3,...etc); The ID count in array can be over 100. What's the best way to select only those rows matching those ID's in array? The usual SELECT * FROM table WHERE ID = '$q[0]' OR …

Member Avatar for urtrivedi
0
259

The End.