- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
29 Posted Topics
Re: [code=php] trim($d); [/code] [quote] This function returns a string with whitespace stripped from the beginning and end of str . Without the second parameter, trim() will strip these characters: * " " (ASCII 32 (0x20)), an ordinary space. * "\t" (ASCII 9 (0x09)), a tab. * "\n" (ASCII 10 (0x0A)), … | |
Hey folks, I'm working on animating gifs in GD. I've adapted the use of the GIFEncoder class from phpclasses. original [B]gif.php[/B] [code=php] <?php Class GIFAnimator { var $GIF = "GIF89a"; var $VER = "GIFEncoder V2.05"; var $BUF = Array ( ); var $LOP = 0; var $DIS = 2; var … | |
Hey folks, I have made an image-based shoutbox and now users can view older and newer message on the shoutbox depending on the $_GET['page'] - pagination - that works. However, since it's image based and can be linked in forums etc. on the Internet I only want it to save … | |
Hey all, I've been working on this project for a while now, it was originally called 'MyChat' or 'MyChatbox' but it was more along the lines of a shoutbox, than a chatbox so it has been named 'JustShout!'. The entire concept of it is an image based shoutbox. Usual/traditional shoutboxes … | |
Re: As far as I know, PayPal use CGI, but you've a three way bet on CGI, Perl and PHP. Any guess is as good as any | |
Hey folks, yet again. [code=php] if ($back == "m") //$back is a value pulled from a db; that works perfectly. { $wid = $rowing['width']; $hei = $rowing['height']; createthumb("660x240background2.gif", "./user/" . $user . "_back.gif", $wid, $hei); $image = imagecreatefromgif("./user/" . $user . "_back.gif"); $blue = ImageColorAllocate($image, 200, 200, 255); // prepare … | |
Re: [QUOTE=Suhacini;619709]Changed the code again. [code] <?php include ('conn.php'); // by default we show first page $page = 1; // if $_GET['page'] defined, use it as page number if(isset($_GET['page'])) { $page = $_GET['page']; } // counting the offset $offset = ($page - 1) * $rowsPerPage; //$searchresult = array(); $var = $_POST['keyword'] … | |
Re: It's so called "script injection". Are you using Wordpress blogs or WP-Stats in your website? For they are particularly vunerable?.The way that is done is with specially crafted SQL using certain parameters to then gain access to the back-end database. Check your database and see the post in there. | |
Re: Yeah, there's most likely an error in the .htaccess file which is causing the problem; .htaccess is one of the first files the browser reads. | |
Re: [QUOTE=queenc;618933]hi i want to hide my URL ..i.e when the user uses my application i dont want to show my url but i want to store another url please do tell how to do tat[/QUOTE] There's no way of hiding it completely but do you mean like this: instead of … | |
![]() | Re: Don't know why you would because jpg is a lot worse quality than png. If I were you convert to gif, but that's just me. Convert to jpg: [code=php] $image = ImageCreateFromPNG("yourimage.png"); header("Content-Type: image/jpg"); ImageJpeg($image, "yourpngimage.jpg"); ImageDestroy($image); [/code] Convert to gif: [code=php] $image = ImageCreateFromPNG("yourimage.png"); header("Content-Type: image/gif"); ImageJpeg($image, "yourpngimage.gif"); ImageDestroy($image); … |
![]() | Re: If you opened said first process with proc_open() then you can use the function proc_close() to stop it running again. |
Hi folks, I have an image based shoutbox which I am currently implementing emoticons onto. I have a way now for the emoticons to appear where the :D or =) etc. is on the image, but for some reason they seem to be conflicting. I shall try to explain. chatbox.php … | |
Hi folks, I have a system for an auctioneer and have on the form I have the fields: lot (the item), reserve price ([Reserve]) and minimum successful bid so far ([Min]). There is then a text box for the user to input their bid ([Bid]). I have set up a … | |
Hi folks, I have made a ledger sub in Excel. The task is to create a spreadsheet solution for a foreign exchange bureau so each transaction that happens it adds the details to a ledger sheet. For this I have this code: [code=vb] Sub ledge() Dim r As Excel.Range Dim … | |
Re: [QUOTE=aran87;591785]hello is this how u do a delete query from mysql table i need to delete it depending on id number so if user enters id 10 it needs to delete the all the rows that have id 10 from any table which has that id.. thanks $query = "DELETE … | |
Re: Once you have stored the password in the database there are two options: [code=php] $pass = mysql_real_escape_string(htmlspecialchars($_POST['password'])); $sql_a = "SELECT * FROM secure WHERE password = '$pass' LIMIT 1"; $result_a = mysql_query($sql_a); $count_a = mysql_num_rows($result_a); if($count_a == 1) { //if password is correct //Run your code to update database } … | |
Re: [QUOTE=JanqeD;589749]w00t I got it thanks so much you even taught me something ' can be inside of " but " cant be inside of ' ;][/QUOTE] ' can be inside " and " can be inside ', but ' can't be inside ' just like " can't be inside ", … | |
Re: [code=php] <?php echo "<select name='dropdown' id='dropdown'>"; $sql = "SELECT country FROM tbl_user WHERE username='$username'"; $result = mysql_query($sql) or die("Error in sql: ".mysql_error()); $row=mysql_fetch_array($result); echo '<option value="'.$row['country'].'">'.$row['country'].'</option>'; echo '</select>'; ?> [/code] That'll get the only value for them from the db or [code=php] <select name="country"> <?php $sqlx = "SELECT * FROM … | |
Re: Also, assuming that there is a unique ID field there is an easier way. You can simply do a query like this: [code=sql] SELECT * FROM `tblxdetails` ORDER BY `id` DESC LIMIT 1 ; [/code] and it will give you the last added field only Though this will only get … | |
Re: Try [code=php] if (isset($_POST['submit'])) { $emal = htmlspecialchars($_POST['email']); $name = htmlspecialchars($_POST['q']); unset($error); $error = array(); if ($emal == '') { $error[] .= 'Email Address is Blank'; } if ($mess == '') { $error[] .= 'Surname is Blank'; } if ($emal != "" && !preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $emal)) { $error[] .= 'Invalid email … | |
Re: You missed off an 's' the variable you defined is $results but you keep calling $result, change it to $results or change the defined variable to $result. [code=php] $result[B]s[/B] = mysql_query($query, $link) $num_movies = mysql_num_rows($result); [/code] hope that makes sense, Sam Sorry, posted at the same time as ryan, at … | |
Re: Do you just want the link to open in a new window? (new tab in newer browsers) Or are you wanting a 'pop-up box'? Sam | |
Re: You used double quotes for the statement, but used them within, too. so change your line 89 to this [code=php] $add_fax_sql = "INSERT INTO fax (`master_id`, `date_added`, `date_modified`, `fax_number`, `type`) VALUES ('".$master_id."', now(), now(), '".$_POST["fax_number"]."','".$_POST["fax_type"]."')"; [/code] it now should work. Sam | |
Re: Hi vijukumar, You should make it so that the login form posts to the same page as with the login form $_SERVER['PHP_SELF']; Upon successful login you should have it show a link for the user to click and look at the resume. Upon successful login: [code=php] //code to check login … | |
Re: [code=html] <a href="javascript:history.back(-1);">Previous Page</a> [/code] is an option. Then if you're using php you could start a session $_SESSION['page'], with the page name set differently on each page. For example: on the page you want where the 'previous page' link is. [code=php] session_start(); $_SESSION['page'] = "this page"; [/code] then on … | |
Re: Is all that code from process.php? I imported it to an editor [quote] line 50 = $UsernameExist = mysql_num_rows($UsernameQuery); line 61 = // Generate confirmation key for settings which require one line 70 = // CHECK FOR REQUIRED FIELDS line 73 = print "<p><font size=\"3\" face=\"Verdana, Arial\" color=\"#FF0000\"><b>Username field cannot … | |
Re: [QUOTE=aran87;587301]hello i got two vaildations on one form but can i have two submit buttons?? onSubmit="return checkcheckl(?)"[/QUOTE] If you use [code=html] <form onsubmit="checkcheckl(?); checkcheckl2(?);"> [/code] then you only need one submit button. Sam | |
Hi folks, I have a script that pulls user comments from a database, which works fine. It's an image based script so I'm trying to now add emoticons, for such as =D or =) To do this I plan to use list(,,,,,,$left,$top) for the imagettfbox of where =D or =) … |
The End.