Hi, I am currently trying to make a part for my user driven website where one user can subscribe to another and whoever they have subscribed to is echoed back on there profile page.
my users table structure is: id username password and my subscription table is: id user_id follow_id
i am currently trying to query the logged in users subscriptions with this sql_query
$subsQuery = mysql_query("SELECT U.username FROM users AS U INNER JOIN subscription AS Sub.follow_id=U.id WHERE Sub.user_id=".$ID); $ID being the logged in users id.
However when trying to echo this on the page using this bit of php:
<? while ($subs = mysql_fetch_assoc($subsQuery)) { ?><br /><br />
<? echo $subs['username'] ?>
<? } ?>
it throws back this error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/avince/public_html/users/user.php on line 53
Any help would be much appreciated!
$variable = $variable
HelloSorry if this is a really simple question but I have run out of ideas. Is there a really simple way of doing the following:$animal_dog = $something_something[$i]['animal_dog'];$animal_cat =
PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it works just fine. But when I change the redirect URL to something like:
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.i have this code Code: echo '<form action="archivedBookings.php" method="get">';
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javascript array. is this possible? I tried with Json_encode but it doesn't seem to work. is there
Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the scores of the NFL games every week I have it split apart down to each game two teams and a score
PHP, jAVASCRIPT setting input values, why isn't it working?
Hi:I am calling this javascript:<script language="javascript">function set_item_values(x){document.forms.form1.GetElementById(x).value =
mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??Any idea how I rectify this issue?
cURL proxy
Okay here is the thing... i know how to add proxysCode: curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);curl_setopt($ch, CURLOPT_PROXY,"[i][b]PROXYHERE[/b][/i]");Here are my questions..
Problem Dereferencing
With these types and tables:
File upload issues
Hi Guys,Can anyone see any issues with this code:Code: $setImage= 'productimages/' . date(U) . $HTTP_POST_FILES['setImage']['name'][0];copy($HTTP_POST_FILES['setImage']['tmp_name'][0], $setImage);Its