Juan
Juan

Reputation: 27

having trouble setting up sms php

I cant seems to send text message using php

this code doesn't work but everything shows up $text['pn'] is the phone number (##########) and $text['pp'] is provider (@myboostmobile.com)

$text = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE username='plmexico'  "));
     $textto = $text['pn'].$text['pp'];
mail($textto, "", "http://www.logamp.com/mobile/vmusic/view.php?id=", "From: notification <[email protected]>\r\n");

when i do it this way

mail("##########@myboostmobile.com", "", "Your packaged has arrived!", "From: test test <[email protected]>\r\n");

it works fine

Upvotes: 1

Views: 89

Answers (1)

Nick Pickering
Nick Pickering

Reputation: 3185

Maybe,

$textto = $text['pn'] . '@' . $text['pp'] . '.com';

Verify the contents of textto.

Edit: Basically the goal here is, when you have two similar lines of code and only one of them is broken, you have to move the broken line of code slowly closer to other one to pinpoint where the problem really is.

Upvotes: 1

Related Questions