Quantcast
Channel: PHP Freaks: PHP Help
Browsing all 13200 articles
Browse latest View live

array_rand with a seed

I would like to know how I can create a customized array_rand so I can give it a seed and generate expected results based on the number seeded. Any thoughts on how to do this?

View Article


adjacency list to xml - additional check

Hi,   I am converting an adjacency table to a xml with this code (coming from phpfreaks, thank you Barand!) <?php $data = array( 1 => 0, 2 => 1, 3 => 1, 4 => 2, 5 => 3, 6 => 5 );...

View Article


preg_replace

hi all, i am a newbie member of php world, i need to learn the answer of a simple question   why "preg_replace('/\[url="(%5BA-Za-z0-9\-._~:\/?#%5B\%5D@!$@&()\'*+,;=%%5D+)"\](.+)\[\!url\]/', '<a...

View Article

Need Help With Loop of Results After Join Query

I am working on an online directory for a state organization.  Members are companies which have contact individuals, and some have branch locations.  I am working on this in steps, so that my questions...

View Article

why isnt this working?

<form action="cat.php" method="post"> Cat name: <input type="text" name="cat" /><input type="submit" name="submit"></form><?phpif (isset($_POST['submit'])){ $con =...

View Article


PHP Timestamp

Is there a way to add a timestamp when finished uploading to server?   For example: An image named Testing.jpg is uploaded to the server. I want it to automatically be renamed to...

View Article

T_variable parse error - mysqli prepared statement

Im getting  " Parse error: syntax error, unexpected T_VARIABLE on line 17"   (//stop here) after making a few changes to my file.   I've checked the GET variables, and I've checked my database field...

View Article

Increment + 1 to a column in a table,

How can I increment + 1 to a column in a table, using update mysql command ?   Moises

View Article


session

* I have a field in a db table called "name", as would be helping me to record it in a session to be viewing this page?   * Here is the code that the user uses to login.   <?php   include...

View Article


Copy Function

I need to modify the script to additionally do the following: Once the image is on the server, I want it to duplicate itself, then, rename the new duplicated file to a variable name. (Let's say $TEST ....

View Article

bcrypt passwords in a database

Hi,   I'm currently using this tutorial to guide me and I'm trying out some of the examples but I don't really understand it.   The version of PHP I'm using is 5.3.27 so I'm using this compatibility...

View Article

Should be an Easy Fix

Fairly new to PHP and this is my first post on the site. Just wondered if anyone could help with a piece of code I am trying to get working. It sits inside a Wordpress loop and pulls your 10 latest...

View Article

Image may be NSFW.
Clik here to view.

Get {nb} value for total page count

Hi, i need to output the footer only in the last page of my pdf. Is there any way that i can count the total number of pages and then compare the current page value with the last page value? If the...

View Article


Loading link in pop out instead of new window (code provided)

Hi everyone!    I have social network sharing buttons on my WordPress website.  The problem is: When you click on them, they open in a window instead of a little pop-up box.    With the original &...

View Article

ms access 2007 and php

<?phpif(isset($_GET['b_no'])){$bno=$_GET['b_no'];include("connect.php");$query19="select * from billing where...

View Article


LARGE WHERE SELECT

Hi guys,   I have two mysqli tables (people and data)   People has their id and data has the people_id   now I need to run a SELECT against data for a select 100 people based on a condition within...

View Article

While loop radio buttons with different values

I have the following php code that produces some multiple choice questions with each answer per question giving different points. <?php $done = $_POST['done']; if ($done  < '1' )  { ?>...

View Article


Check if Record Exist

I have this HTML FORM <form action="check_record.php" method="post"> <input type="text" placeholder=""Last Name" name="lname"></input> <input type="text" placeholder=""First Name"...

View Article

Setting 'selected' attribute of a dropdown list item based on id returned...

So I'm trying to set the "selected" attribute of a dropdown list's option based on the stored id of a table. Here's my code so far which I can't seem to figure out what I'm doing wrong. Again, please...

View Article

Access denied for user 'ODBC'@'localhost' (using password: NO)

please help me.... fault in the part where...////?/// and how to fix them/////...???/       <?php      include_once("./koneksi.php"); //$connect=mysql_connect("localhost","root","jerry") or die...

View Article
Browsing all 13200 articles
Browse latest View live