38,019 Topics

Member Avatar for
Member Avatar for branding4you

I need a simple solution I have invoice that i want to always diplay 10 rows, but if there is data in mysql it must first put those rows with data in on the invoice then subtract the number of rows and the difference will be the blank rows it …

Member Avatar for branding4you
0
160
Member Avatar for jacob21

Hi,I am working on this code.the problem is its not going to 2nd elseif(upload). need suggestion. [CODE]if(empty($mobile)) { echo '<script language="javascript">alert("Enter Phone Number")</script>;'; } elseif(!(empty($mobile))) { if((is_numeric($mobile))) { if((strlen($mobile)!=10)) echo '<script language="javascript">alert("phone number should be of 10 digit")</script>;'; } else { echo '<script language="javascript">alert("Please Enter valid phone number")</script>;'; } } …

Member Avatar for edwinhermann
0
83
Member Avatar for codetr

hi I wrote php code do.php [CODE]<?php session_start(); ob_start(); $salladim = $_SESSION['salla']; $salladin = isset($_GET['url'])?$_GET['url']:'' ; if(!in_array($salladin,$salladim)) { header( 'refresh: 1; url='.$_SERVER['HTTP_REFERER'].'' ); echo '<h2>Hazirlaniyor...</h2>'; exit(); } [/CODE] file.php [CODE]<?php session_start(); function kodsalla($uzunluk) { $karakterler = "0123456789"."ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $kod = ""; while(strlen($kod) < $uzunluk) { $kod .= substr($karakterler, (rand() % strlen($karakterler)), …

Member Avatar for twiss
0
402
Member Avatar for ditty

Hi In my new project i have to give an option to convert an english text to chinese.Can any one help me to do this. Thank you

Member Avatar for twiss
0
98
Member Avatar for shadowscape

Hello, i am trying to create a php script that offers the following functions... wardrobe.php?friend=FRIENDNAME wardrobe.php?hash=HASHTAG but i dont want you to be able to use both at the same time, please could you help improve my code to become more stable, add error checking and also offer this feature …

Member Avatar for shadowscape
0
138
Member Avatar for prawin@123

Hi i am new to PHP, Can anyone fix this problem to me. i am writing a code to change password where i have already encoded a password and stored in database. and in a new changepassword form i have to do two things one is to get the oldpassword …

Member Avatar for alphabeta8
0
192
Member Avatar for GigsD4X

[CODE] $doc=new DOMDocument(); $doc->loadHTML($str); $doc->getElementById("MainTable")->getAttribute("id");[/CODE] Displays the error Fatal error: Call to a member function getAttribute() on a non-object Oh and $str is the HTML of a page :p D: Am I doing something wrong? :o

Member Avatar for GigsD4X
0
115
Member Avatar for Xcelled194

I need to retrieve a HTML file from an external site ([url]http://example.com/page.html[/url]) and parse it. Parsing it is fine, however I can't seem to find a way to retrieve the file given this: [LIST] [*]Cannot use cURL [*]Must work on PHP 4.3.9+ [*]Must retrieve the file as a HTTP request …

Member Avatar for migcosta
0
569
Member Avatar for klemme

Hi, I am using sha1 for a registration form like this: [CODE] if($_POST['pass1']==$_POST['pass2']){ $password = sha1(mysqli_real_escape_string($connection, $_POST['pass1'])); } // This inserts an encrypted row in the DB, and works fine [/CODE] When i want to log in, well I cant login..This is the script: [CODE] $email = mysqli_real_escape_string($connection, $_POST['email']); $password …

Member Avatar for migcosta
0
626
Member Avatar for bufospro

Hi, I have a php array as the following format array([4]=>6 [8]=>12 [3]=>5) and I would like to add 6+12+5 The problem I have is that neither number of array cells nor array_keys are known. Thanks a lot

Member Avatar for bufospro
0
152
Member Avatar for calebcook

Hi. I've created an email system where people can sign up and receive emails. I want to make a link that says: "Trouble viewing email? View online!" or something like that. I've made it so that the email sent to people is saved to a database, and then it will …

Member Avatar for ko ko
0
214
Member Avatar for abhi10kumar

I want to write regular expression for [URL="http://www.servicesonclick.com/products.php?brandid=27&pname=Acer"]http://www.servicesonclick.com/products.php?brandid=27&pname=Acer[/URL] that redirects to [URL="http://www.servicesonclick.com/Acer"]http://www.servicesonclick.com/Acer[/URL] [B]and[/B] similar to [URL="http://www.servicesonclick.com/products.php?brandid=29&pname=Gigabyte"]http://www.servicesonclick.com/products.php?brandid=29&pname=Gigabyte[/URL] also redirects to [URL="http://www.servicesonclick.com/Gigabyte"]http://www.servicesonclick.com/Gigabyte[/URL] and so on

Member Avatar for abhi10kumar
0
277
Member Avatar for Dragonbaki

Hi experts., Can anybody help me out how to upload multiple files using php..? I need to select multiple files at the same time and when click to upload, it should upload all files at once..? Can we do that..? Help me...! Thanks, Dragonbaki

Member Avatar for diafol
0
147
Member Avatar for seularts

I know this is a stupid question, but how can I get the value $mail out of this function? [CODE] function Email() { $the_name = $_SESSION[$this->GetLoginSessionVar()]; $profil_query="SELECT * FROM $this->tablename WHERE username='$the_name'"; $resultate_profil=mysql_query($profil_query); $resultat=mysql_fetch_array($resultate_profil); $mail = $resultat['email']; } echo $mail; [/CODE] Thanks.

Member Avatar for seularts
0
124
Member Avatar for klemme

Hi guys, It is working fine, and only allowing letters and numbers. I want to a feature, so that it has to be between 3-20 charachters/numbers long. [CODE] if (!preg_match("/^[A-Za-z0-9]+$/i", $_POST['brugernavn'])){ $dosomething = ''; } [/CODE] This is not working: [CODE] if (!preg_match("/^[A-Za-z0-9]{3-20}+$/i", $_POST['brugernavn'])) [/CODE]

Member Avatar for klemme
0
4K
Member Avatar for abhi10kumar

How I can create url like [url]http://www.sitename.com/category[/url] (without slash). I know how to create [url]http://www.sitename.com/category/[/url] (with slash)

Member Avatar for nivibala
0
172
Member Avatar for doctorphp

Hi everyone. I am trying to write a script that lets users of my website purchase credits. They either have the choice of purchasing 1,2,4,6,8 or 10 credits. Here is the code for the PayPal IPN. [CODE] <?php include 'config.php'; // read the post from PayPal system and add 'cmd' …

Member Avatar for vibhaJ
0
429
Member Avatar for sha1023012

I am trying to figure out how to do tables in php. I am working on this.. [CODE]$balance=55.75; $newShirtCost=15.75; $earns=20.00; $bar=.55; echo "Starting balance:$balance"; $balance= $balance -$newShirtCost; echo "<p>Purchase: Clothing Store:".sprintf("$%.2f",$balance)."</p>"; $balance=$balance+$earn; echo "<p>ATM Deposit:".sprintf("$%.2f",$balance)."</p>"; $balance=$balance/2; echo "<p>Balance after split with wife:".sprintf("$%.2f",$balance)."</p>" [/CODE] This is suppose to be display in …

Member Avatar for karthik_ppts
0
141
Member Avatar for jimmybrion

I want to know that is it possible to inter relate two PHP Frame Works ? If possible How ? Please Help me

Member Avatar for einsteinsboi
0
55
Member Avatar for ptara1

I have a html form on another page that is automatically filled from data from the table. I then run the the following script on submit to update the row if any information is changed. Here is the code [CODE] <?php $db=mysql_connect ("connection info") or die ('I cannot connect to …

Member Avatar for klemme
0
170
Member Avatar for calebcook

Hello! I want to create a script which mails emails to subscribers. I'm almost done, but I'd like it to say "Sent to # people". I've tried using: [CODE]<?php $dbc = mysqli_connect('localhost', 'username', 'password', 'database') or die('Error: Could not connect to database'); $query = mysql_query("SELECT * FROM table"); $number = …

Member Avatar for klemme
0
182
Member Avatar for drewpark88

Hey Guys, I have an "events" table in my DB and a "default_events" table also. Every day I display one event. I check to see if any rows in the "events" table match todays date and then display that event, if no events match by date, I check the "default_events" …

Member Avatar for drewpark88
1
116
Member Avatar for garwil

hI all. I have a similar problem to another thread in this forum which did help somewhat but in my case all my records are updating and I cannot get it fixed despite searching around the web... I have searched and tried different things but am not getting anywhere. Maybe …

Member Avatar for almostbob
0
156
Member Avatar for johndohmen1963

Hi hope someone can help me i have the folowing code [CODE]$weinachtfeier = $_POST['aname']; $mapbeschrijving = $_POST ['expl']; $slides="slides"; $thumbs="thumbs"; $new_height1=100; $new_width1=66; $new_height=66; $new_width=100; $allowed_types = array( 'image/pjpeg', 'image/jpg', 'image/png', 'image/jpeg'); $imagesize = $_FILES['pic']['size']; $imagetype = $_FILES['pic']['type']; $imagefile=$_FILES['pic']['name']; if(in_array($_FILES['pic']['type'], $allowed_types)) { copy ($_FILES['pic']['tmp_name'], $_FILES['pic']['name']) or die ("Could not copy"); $imagesize …

Member Avatar for johndohmen1963
0
595
Member Avatar for Dannis86

Hello everyone, I want to build on a project and make a website like youtube just for fun, nothing really special, can I get code already that has been programmed? Or should I go for a whole new code, ofcourse I don't want to copy youtube, just make a website …

Member Avatar for Dannis86
0
188
Member Avatar for TechySafi

[CODE]<?php if (isset($_POST['submit'])) { if ($_POST['lang']=="") { echo "Dictionary name can't be emptry!"; } else { $name=mysql_real_escape_string($_POST['lang']); include('db.php'); [B]$check=mysql_query("SELECT * FROM information_schema.tables WHERE table_name = '$name'"); echo $count=mysql_num_rows($check);[/B] if ($count>0) { echo "That dictionary name already exists!"; } else { $go=mysql_query("CREATE TABLE IF NOT EXISTS $name ( `id` int(11) NOT …

Member Avatar for TechySafi
0
123
Member Avatar for rusty813

some subdirectories will display correctly and other wont... Also these are the folders i have [B]website[/B] [LIST] [*][B]admin[/B] [LIST] [*]add.user.php [*]index.php [*]login.php [/LIST] [*][B]css[/B] [LIST] [*]styles.css [/LIST] [*]footer.php [*]header.php [*]newsletter.php [/LIST] 1. [url]http://localhost/xampp/website/newsletter.php[/url] correct sub...[url]http://localhost/xampp/website/newsletter.php[/url] wrong sub...missing /admin after website [url]http://localhost/xampp/website/add.user.php[/url] wrong sub...missing /admin after website 2. [url]http://localhost/xampp/website/admin/[/url] wrong sub...[url]http://localhost/xampp/website/admin/newsletter.php[/url] …

Member Avatar for diafol
0
228
Member Avatar for jacob21

Hi, I have to make a language (literal) converter in php from english to hindi. i dont want the hindi translation of the word. just typing the same words in hindi if i type 'baloon' in english, it will convert as it is into hindi ( बलून ) ् I …

Member Avatar for urtrivedi
0
34
Member Avatar for lyrico

Hi to All, Is this code can be done with link <a hef=''>? [code] <?php echo "<form action='page.php' method='post'>"; echo "<input type='submit' name='submit' value='Go to Page'>"; echo "</form>"; if($_POST['submit']=="Go to Page") { } ?> [/code] in the code above, once the user click the button, the page load and execute …

Member Avatar for lyrico
0
129
Member Avatar for lsvife

i am new to PHP programming.. I cant access phpmyadmin and its says "You don't have permission to access /phpmyadmin/ on this server." when i tried to use the ipaddress of my computer instead of localhost... how to fix it can anybody help me???

Member Avatar for ko ko
0
259

The End.