Archive for the ‘program in php’ Category
I m writing Php code in html program. nw i need how to read value of input tag in php program?
Uhm….. more information would be very helpful. Possibly an example of your code and what you’re trying to do?
You might want to check out http://www.w3schools.com/php/php_post.asp
please please help me in this PHP program problem.. please its urgent..please?
i created a div and set a background image in that div by using style tag and in that div i created a form… so i want to create a button with onclick event… so that whenever that button is clicked the background image of the div should be changed…so please please help me how to do this?
<div id="div3" style="background-image:url(../images/re… border:double; border-color:#666666; z-index:1; width:230px; height:350px;position:absolute; left:45px; top:15px;">
<form name="chatting1" action="chat1.php" method="post">
<textarea name="chat1" cols="25" rows="3"></textarea>
<br>
<input type="submit" name="submit" value="REPLY">
now create a button which changes the background image of the div whenever it is clicked…
<head>
<script>
bkgnew = new Image(); // preload the image!
bkgnew.src = "newimage";
function change_bkg()
{
var x = document.getElementById(’div3′);
x.style.background-image = "url(newimage)";
}
</script>
</head>
<body>
<div ….
<form …
<input … onmousedown="change_bkg(); return false;" />
Preload the image with the first two lines of the script.
Use "onmousedown" instead of "onclick": When you click, the form will be sent, and you will not have the time to see the change!
Get the free script "mini Chat" at http://www.web2coders.com
When u enter url of a php file, program to do specific function?
and when u close web-page in middle of processing will php file will continue till end?
Yes. simple and straight answer.
please help me about this PHP program problem?
Hi i want to create a drop-down-list in PHP.
In yahoo answers’ home page there are some tabs like "MY activity" "browse categories" and these tabs have some sub tabs….so whenever mouse-pointer comes over these tabs so the sub tabs are displayed as a list….so how to do this…please help me please it is urgent.
ok but please give me the java code to resolve this problem…
You’d be better off using Javascript.
PHP has nothing to do with it.
Or you can try using css if you know what you’re doing.
Help! How do I do this in php?
I’m always getting tripped up in php because there’s no way that I know of to "call" or "run" from one php program to the next without form input.
I am collecting data on a Web form that needs to be passed to a server for processing. I have a form with action="calculate.php". When the user submits the form, calculate.php reads the form fields and does some calculations. This is where I need a "run" command. The calculated fields are to be processed by a program on the server. I don’t know how to fire off this program without another <form action=….> tag. In this case it’s stupid to have the user hit submit again just to send data to the server. There really isn’t anything for the user to review. And it’s not an option to do the calculations on the server because that’s a black box application (and I don’t have access to the server).
So the only way I can see it flowing is like this:
Enter data
Submit form
php program does calculations
Useless form appears
Submit form again
Server-side program does its thing
What am I missing here? Surely this has come up thousands of times.
Thanks,
Houyhnhnm
Deepak, I am totally ignorant in Ajax and very weak in JavaScript. I know how to do math in JavaScript but I have no idea how to pass the results to the server or the php script. I thought the whole idea of JavaScript was to keep everything local anyway…
can you use javascript to do calculations?
is it too complicated to do with client side ?
can you use ajax so that some other form does the calculation?
…………………..
if you can do math using javascript, then you can use hidden fields to send data to php script ..
i see that you say it is as a blackbox application, i wonder how can send input data to it. but hope you can use my suggestion..
ex: i assume that "F_Total" is input for your blackbox application! ( a post parameter for your application)
<input id="F_Tot" name="F_Total" type="hidden" />
( if you use "name" attribute in your html tag, you can get the value at php script after submit. this works in any server side languages)
do all calculations before you submit,
<script type="text/javascript">
function doyourcalculation(){
var result;
F_Tot = document.getElementById(’F_Tot’); // find hidden field
.
.
.
calculations
result = 3 + 2;
.
.
if (result){ //if result is not nothing
F_Tot.value = result;
return true;
}
else
return false;
};
</script>
use return true or false for validations…
<input type="submit" value="submit" onclick="doyourcalculation()" />
if doyourcalculation has no error and returns true, hidden field has the input for your blackbox application.
good luck..
Any good free Web design programs for PHP?
There’s a Website in which the page is entirely in PHP, but displays the page as HTML. I need a free Web design program that would display PHP code as HTML so I can make some changes to the page.
Dude , PHP code is interpreted to the appropriate HTML when the Web server sends the requested Web page to the browser ( the Web server does NOT send PHP under normal conditions UNLESS error)
…not sure what ur asking about
php program help please!!!!?
really need this program but can’t make it no matter how hard i try
if a user types w e r g i in one test field,
the return should be
Total Number of elements: 5
Heighest element: w
Lowest element: e
please help me out here. i m new 2 php and really need it. thank you.
two files:
1) input.html
<HTML>
<BODY>
<center>
<form method=’post’ action=’xhi.php’ >
Please enter the alphabets:
<input type=’textbox’ length=30 name=’alpha’ />
<input type=’submit’ value=’submit’ />
</form>
</center>
</BODY>
</HTML>
2) xhi.php
<?php
$entered_val = explode(" " , $_POST['alpha']);
$total_char = 0;
$high = ‘a’;
$low = ‘z’;
//declaring array $arr
$arr = array(’a',’b',’c',’d',’e',
‘f’,'g’,'h’,'i’,'j’,'k’,'l’,'m’,'n’,'o’
,’p',’q',’r',’s’,'t’,'u’,'v’,'w’,'x’
,’y',’z');
//associating value with alphabets a=1, b=2, z=26
// in $find
for($i=0;$i<count($arr);$i++){
$find[$arr[$i]]=$i+1;
}
for($i=0;$i<count($entered_val);$i++){
if($find[$entered_val[$i]]<$find[$low]){
$low = $entered_val[$i];
}
if($find[$entered_val[$i]]>$find[$high]){
$high = $entered_val[$i];
}
}
echo "Total number of elements : " . count($entered_val);
echo "Highest Element : " . $high;
echo "Lowest Element : " . $low;
?>
How do I program in php to interact with my sql database to export the data to a new excel spreadsheet?
I have a MySql Database and I am looking for a good easy to understand script in php that will interact with my Database and pull the information to a new Microsoft Excel file.
Please attach any good links you know of. Thanks!
Excel can read CSV files; these are very easy to write in PHP:
$file_handle = fopen("filename.csv", "w");
$result = mysql_query("SELECT a,b,c FROM table");
while( $row = mysql_fetch_assoc($result) )
{
fwrite($file_handle, $row['a'] . ";" . $row['b'] . ";" . $row['c'] . ";\n");
}
mysql_free_result($result);
fclose($file_handle);
Why Do I Need Help From Internet Marketing Agencies?
This is a very common question that internet marketing agencies get. With all the website design software available and inexpensive hosting many small business owners don’t really see the need for help when marketing their small business online.
Yes you can build a webpage with many of the free software programs available or purchase a more sophisticated web design software. There is also hosting available.
All you have to do is ftp the web pages you build to the server. The home page is always the index file.
Remember to build a good deep linking structure by linking each page together and all of them back to the home page. It is also a good idea to put links in the content to link to similar pages. Setting this type of a linking structure can keep people on your website much longer.
Install the script for your auto responder into the contact page so you can catch all the valuable contact info of your visitors. Depending upon the amount of traffic you intend to drive to your site you can use a 3rd party auto responder for a monthly fee. The most efficient is to buy your own software and ftp it to your server.
With this in place you can set up an email marketing campaign which can prove to be your most valuable revenue source if marketed effectively.
Now you must drive traffic to this beautiful site you built. There are multiple internet marketing strategies you need to implement. They target different traffic sources so each needs to be considered. Also some internet marketing strategies are effective immediately like PPC, PPI, PPA etc. Beware that these types of campaigns can add up a large bill very quickly so keep a close eye on these daily.
Some take a little more time like some deep linking campaigns and search engine marketing but these can prove to be the best internet advertising in the long run.
Don’t forget the social media networks which are becoming very popular with you tube ranking in as the second largest search engine for information now on the internet.
Now comes time for the tweaking, to maximize ROI. Install the script of a good statistics program that you prefer so you can begin to analyze data and see which internet marketing strategies campaigns are working best for you. Remember if your tracking script is in php code and your index extension is htm or html you must rename it to php or your tracking code will not read properly.
If all of these things are something you understand and excel at then I do not see why you need any help from internet marketing agencies in marketing your small business online.
Sherrie Chastain
http://www.articlesbase.com/internet-articles/why-do-i-need-help-from-internet-marketing-agencies-687696.html
Apply Bad Card Credit Credit Online
Within this article on Apply bad card credit credit online, we will look at a couple of different cards that you can look at applying for. We will look at the benefits of each card and let you come up with the decision on what you think the best card for you is.
The first card we will look at within this article on apply bad card credit credit online can be found at: https://www.firstpremierbankgold.com/fees50/. This website lists all of the information regarding what you will want to look for. This card offers an attractive fixed rate of only 9.9%. That is a great rate but when you keep reading, there is a one-time fee of $29 as well as a program fee of $145 and a participation fee of $72, billed at six dollars a month. If you are starting to rebuild your credit, you should look into making small purchases and then paying off that balance every month. That will start you slowly moving in the right direction.
The second card that we will look at is in the Orchard Lake Platinum MasterCard. Being a percentage rate on this is higher, running around 14%. There is an annual fee for this between 39 and $59 but it did not list any sort of program fee or participation fee as with the card mentioned above. They do have periodic credit limit increases so as you make on-time payments and continue to build your bad credit towards good credit, you will be rewarded with a higher limit on your credit card. This is another example of how to apply for bad card credit credit online.
I have used a couple of different examples from one page, where you can great deals of information and credit cards that you can apply for online:
http://www.creditcards.com/bad-credit.php.
Use the information above is the guy we should look for when choosing a bad credit credit card for yourself. There are many different options that you have out there and you should not limit yourself to the first one on the list. Good luck in finding card that meets your needs and helps you rebuild your credit. Remember that this is a car that you will use probably for a least a year before acquiring a better card that can reward you so choose wisely. That is the best advice that we can possibly give you.
Mario Churchill
http://www.articlesbase.com/finance-articles/apply-bad-card-credit-credit-online-106884.html